3 ms·
In case you need to dump/re-flash an SPI memory chip, but don't happen to have an FTDI programmer handy (be that as a protest to their despicable actions with W
by aexaey 10y ago
In case you need to dump/re-flash an SPI memory chip, but don't happen to have an FTDI programmer handy (be that as a protest to their despicable actions with Windows drivers some time ago, or for any other reason), another (much cheaper) alternative is Chinese CH341A, which are available on eBay and other usual places for around $3 (complete assembled programmer board, shipped). CH341A is well supported on both Linux [1] and Windows [2].
[1] https://github.com/setarcos/ch341prog https://github.com/setarcos/ch341prog
[2] https://tosiek.pl/ch341-eeprom-and-spi-flash-programmer/ https://tosiek.pl/ch341-eeprom-and-spi-flash-programmer/
- nickysielicki 10y agoIf you own a Raspberry Pi, Beaglebone Black, Intel Galileo, or (honestly) any tiny computer, you can probably read and write SPI via spidev. [1] Another alternative is a buspirate, but it is much slower. [2] If you don't plan on doing this often, it's probably the way to go. Cheap and has the ability to do a lot more than just SPI. But there is definitely not a need to shell out $100+ for a dediprog. Big warning, though, if you decide to use any of these methods with a chip that is still on-board, you really should use a benchtop power supply. You run the risk of damaging your device otherwise-- I damaged my Beaglebone Black this way. Your device might be able to supply 3.3v to a small chip, but the board probably will draw more than that depending on isolation. If you don't have one, find a cruddy ATX PC power supply on craigslist, probably in the free section. The orange lines are 3.3v and will work in a pinch. [1]: http://linux-sunxi.org/SPIdev http://linux-sunxi.org/SPIdev [2]: http://dangerousprototypes.com/docs/Bus_Pirate http://dangerousprototypes.com/docs/Bus_Pirate
- aexaey 10y agoSmall nit: $3 != $100+ That said, using native SPI bus on a closest laying around (embedded) Linux board is an awesome idea hardware-wise. What about software though? Will dd if=file.bin of=/dev/spidev0.0 fail to write to an SPI NOR chip?
- nickysielicki 10y agoFlashrom [1] is the go-to tool for everything SPI on *nix. It knows how to identify chips and will prevent you from doing anything stupid, if it can. [1]: https://www.flashrom.org/Flashrom https://www.flashrom.org/Flashrom (As of January, it looks to have support for your $3 programmer! https://github.com/flashrom/flashrom/blob/86bb6c55dd3bb1a167dec4548976d1d10748ded7/ch341a_spi.c https://github.com/flashrom/flashrom/blob/86bb6c55dd3bb1a167... )
- aexaey 10y agoNever heard before about the "flashrom" tool. Looks nice, especially the long list of supported HW. Thanks!
- danjoc 10y agoWanted to mention the SPI flash work done by the person behind thunderstrike.[1] "This device can read the chip in tens of seconds, write it in less than a minute."[2] [1] https://trmm.net/SPI_flash https://trmm.net/SPI_flash [2] https://trmm.net/Thunderstrike_31c3 https://trmm.net/Thunderstrike_31c3