spi-flash-programmer
spi-flash-programmer copied to clipboard
Unable to write to the chip
Using ESP8266 as programmer, compiles good. I can read and verify data.
I can enter commands manually, but that's not working. Client program also dosen't work, instantly returns "Could not write page 0x00000000". Chip is new, unlocked.
I've not tried using spi-flash-programmer on an esp8266, but maybe others can help you... do you get any error message when you try to enter the write commands manually? Does the client work for e.g. reading?
[update] Didn't work on Leonardo either.
SPI is wired correctly as I can read chip signature, chip content and protection status. Serial console commands work for reading and filling the buffer with data. Writing returns no error, but after verification - it clearly dosen't work (together with chip/page erase).
Which kind of flash do you use? I recently phased in some extensions. I tested with standard Winbond & Gigadevice flashes. Can you send me the spi_flash_programmer_client.py status-register spi_flash_programmer_client.py id-register output?
I have used W25Q64CVSSIG and FT25H04 chips. Neither of them worked. I don't have my programming "rig" anymore, but I remember both chips were unlocked.
Well, from the description it's not 100% sure what fails here. The Arduino implementation polls the status register after every "page program". The loop in impl_wait_for_write_enable() has no end condition other than the WriteInProgress-Bit being 0x0. The client implementation typically waits 3 seconds for the arduino to confirm a successful "page program" and following sends a "read" command to verify a successful write using a CRC.
It sounds like the latter condition is the case that the client cannot verify the CRC what also means that the "page program" did not happen on the device or the data got corrupted (I have really bad experience with flying wire setups). Without the possibility to reproduce the problem and being able to enable the debug mode of the client I am out of ideas right now. The flash chips you tested are "standard" ...
[update] Didn't work on Leonardo either.
On Leonardo it's a buffering issue I'm sure. With my flasher I'm unable to fill the whole 256 byte buffer at once. I have to send data in 32 byte chunks otherwise Leonardo locks up.