Is there any way to force JFlashSPI to write a custom SPI command *before* it tries to read the flash ID?
I'm using a JLink Plus to program a W25X40CL SPI flash[0] for a Lattice ICE40 FPGA. The FPGA reads the configuration bitstream from the flash at reset, and then issues the 0xB9 (Deep Power Down) command to the flash chip[1]. After that command, the flash chip does not respond to any commands except for 0xAB (Release from Deep Power Down). When the JFlashSPI tries to read the flash ID (0x9F), the flash chip does not respond (as expected).
I've tried creating an init sequence to write the 0xAB command, but JFlashSPI always tries (and fails) to read the flash ID before it starts the init sequence, so I cannot wake up the flash chip.
My current workaround is to disable auto-detecting the flash chip and manually specifying the flash details with the flash ID replaced by FF FF FF. This allows the flash ID check to pass so we can move on to the init sequence that wakes up the chip, and then everything continues normally.
[0] winbond.com/resource-files/w25…pdf?src-supplier=Digi-Key
[1] http://www.latticesemi.com/view_document?document_id=46502
I'm using a JLink Plus to program a W25X40CL SPI flash[0] for a Lattice ICE40 FPGA. The FPGA reads the configuration bitstream from the flash at reset, and then issues the 0xB9 (Deep Power Down) command to the flash chip[1]. After that command, the flash chip does not respond to any commands except for 0xAB (Release from Deep Power Down). When the JFlashSPI tries to read the flash ID (0x9F), the flash chip does not respond (as expected).
I've tried creating an init sequence to write the 0xAB command, but JFlashSPI always tries (and fails) to read the flash ID before it starts the init sequence, so I cannot wake up the flash chip.
My current workaround is to disable auto-detecting the flash chip and manually specifying the flash details with the flash ID replaced by FF FF FF. This allows the flash ID check to pass so we can move on to the init sequence that wakes up the chip, and then everything continues normally.
[0] winbond.com/resource-files/w25…pdf?src-supplier=Digi-Key
[1] http://www.latticesemi.com/view_document?document_id=46502