CuVoodoo

the sorcery of copper

User Tools

Site Tools


dump_spi_flash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
dump_spi_flash [2021/04/13 18:14] – [BX48] kingkevindump_spi_flash [2021/04/14 18:47] – add in-circuit kingkevin
Line 186: Line 186:
 rm ChipDB.zip rm ChipDB.zip
 </code> </code>
 +
 +===== in-circuit =====
 +
 +In-circuit flash programming is a lot more tricky.
 +The issue is that the flash chip needs to be powered, but the MCU using this memory is probably on the same power real.
 +Thus the MCU might use the flash chip, interference with your operation.
 +SPI is a point to point connection protocol.
 +On the SPI lines there should be only one master.
 +This master drive the SCK and MOSI lines in push-pull mode.
 +If your programmer sets a line low while the MCU sets it high, a lot of current might go through this line as both device try to drive the line (particularly if not inline protection resistor is used).
 +
 +There are several solution to prevent this battle and be able to program the chip:
 +
 +  * MCU often have a RST line (active low): driving this line will prevent the MCU to boot and drive the lines, leaving them floating for you to use
 +  * lift the VCC pin of the flash chip: now you can power the chip individually, without powering the MCU and preventing to to drive the lines
 +  * if there are inline protection resistor on the SPI lines, remove them from the board, preventing the MCU to drive them (be sure to connect your programmer on the flash side of the lines)
 +
 +Once this is done, the easiest way to connect to the flash chip is to use a clip.
 +This will allow you the clip on all pin of the package, while it is soldered on the board.
 +
 +{{:spi_flash:clip.jpg?0x200|}}
 +
 +If the flash chip package is not a SOIC (or any where the leads are accessible), such a BGA, you will have to find inline protection resistors, remove them, and connect wires to the pads.
 +
 +Now you can use your programmer.
 +But it is very important that it sets the right operating voltage.
 +Providing 5.0V on 3.3V or 1.8V power rails might damage any of the devices using this power rails.
 +Also don't forget to drive the MCU reset line (if this is the solution you are using) since the programmer won't do it.
dump_spi_flash.txt · Last modified: 2024/01/07 17:49 by 127.0.0.1