3 ms·
If 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 altern
by nickysielicki 10y ago
If 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!