Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPI programmer recommendation #157

Open
jpouellet opened this issue Apr 4, 2017 · 9 comments
Open

SPI programmer recommendation #157

jpouellet opened this issue Apr 4, 2017 · 9 comments

Comments

@jpouellet
Copy link

jpouellet commented Apr 4, 2017

I'm sure your SPI programmer works great, but for those who do not happen to have a teensy on hand and would end up buying some hardware to flash things anyway, I would recommend picking up a CH341A-based (datasheet) programmer. These:

  • can read & write common SPI & I2C EEPROMs
  • can be acquired for ~$3 USD including taxes and shipping (!) on ebay
  • have a working open source driver to interface with them
  • are decently fast: writes my 8mb ME region in ~100 seconds, reads it in ~60s, erases it in ~25s

SOIC8 clips can also be acquired (w/ tax & shipping!) for about $3 USD on ebay.

@ciaby
Copy link

ciaby commented Apr 5, 2017

I second that, I used basically the same programmer. :)

@osresearch
Copy link
Collaborator

That sound great. Would you take a photo of it in operation and add details to the Installing Heads page?

I also need to update those instructions for the new flashrom based install; there is a two-phase process of flashing the 4MB image to get a Heads bootstrap image that can then mount a USB device and flash a larger image. This is also how subsequent upgrades can be performed without having to access the hardware again.

@tlaurion
Copy link
Collaborator

tlaurion commented May 26, 2017

Actually, it is supported through flashrom. I confirm it works really nicely.
./flashrom -p ch341a_spi

@jpouellet
Copy link
Author

@osresearch I see you're linking to external images in the heads-wiki repo instead of hosting them there. Is there a reason to prefer that over having it self-contained?

Anyway, I don't have a fancy camera, but here are some pictures of a ch341a-based programmer in use:
flashing-1
flashing-2
flashing-3

@osresearch
Copy link
Collaborator

I bought that same SOIC clip on amazon for $10 and it is nowhere near as nice as the $13 Pomona 5250. Unfortunately even those seem to wear out after a few hundred cycles.

You're right that the images should be self contained. They were on flickr when it was hosted on trmm.net so that I didn't have to pay for the bandwidth...

@jpouellet
Copy link
Author

I got my clip for ~$3, but it can be quite frustrating to get it to make a good connection. I've just ordered the one you suggest off digikey, hopefully it's better. Clips in general are pretty annoying, and I almost considered soldering some magnet wire to the pins or something.

Images locally here: linuxboot/heads-wiki#2

@mfc
Copy link

mfc commented Jan 15, 2024

fyi libreboot folks have strong opinions on the ch341a: https://libreboot.org/docs/install/spi.html#do-not-use-ch341a just sharing so folks are aware since in heads documentation ch341a is the default flasher. (i re-purpose an old rpi 3 model B which works fine for me)

@tlaurion
Copy link
Collaborator

tlaurion commented Jan 15, 2024

fyi libreboot folks have strong opinions on the ch341a: https://libreboot.org/docs/install/spi.html#do-not-use-ch341a just sharing so folks are aware since in heads documentation ch341a is the default flasher. (i re-purpose an old rpi 3 model B which works fine for me)

@mfc hey! Thanks for reaching out.

Yeah, had discussions with Leah about that. Main points of her were that assembly is cheap but when confronted about v1.6/1.7 board revision voltage selection, she stayed opinionated outside of the facts. Can you comment on linuxboot/heads-wiki#120 (comment) ? I plan on streamlining and taking new pictures to properly document this in issue prior of putting it in the wiki.

Facts are exposed there, where rainbow cable pictures are still coupled with ch341a v1.2 old board revision, which I programmed hundreds of x230 without issues. But still risky with 5v on old < v1.5 boards where volt selector resolves the issue altogether on > v1.6 ch341a board revisions.

The reason why we prefer ch341a to rpi setup or multipurpose boards is that if the sole goal is to bootstrap and flash spi, getting those accessories can be expensive for people not having that kind of money, where ch341a can be bought through alibaba, ebay and even amazon shipped at your door for 5/10/30$CAD in kits (most kits are < v.15 boards though), where amazon shipped mine under 2 weeks in the holiday season which was fast considering all possible delays in that time period of the year.

So linuxboot/heads-wiki#120 (comment) shows how to buy clip, assemble wires and DIY with panoma (clip is narrower and sturdier which would benefit people flashing often, not so much users wanting to flash once. Still recommendation should go with ch341a >v1.6 board to be on cautious side).

@zifxify
Copy link

zifxify commented Jan 23, 2024

I bought mine years ago after reading recommendations on winraid.
It looks just like this one (3.3v) and is good quality.
image

This links might be useful:
https://winraid.level1techs.com/t/guide-using-ch341a-based-programmer-to-flash-spi-eeprom/30834/82
https://winraid.level1techs.com/t/guide-using-ch341a-based-programmer-to-flash-spi-eeprom/30834/205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants