I am trying to write to a Winbond W25Q64FVSIG EEPROM (SOIC-8) using Flashrom and a Raspberry Pi 3 (running up to date Raspbian). But I receive the message "ERASE FAILED!".
I am using the shortest wires which are practical to connect to the Raspberry Pi (~10CM) and I have checked many times that I have connected to the correct GPIO pins. To make sure that there is a good connection, I abandoned the clip I was using and have soldered the EEPROM to the pads on a daughterboard (designed for the purpose). The wires I am using have factory-fitted female terminals on both ends and connect tightly to the GPIO pins on the RPI and pin head on the daughterboard.
From what I have found some people have flashed this model of EEPROM successfully using Flashrom, but others have encountered the same problem. I have not been able to find a solution. If anyone can offer assistance or advice I would me most grateful. Thank you.
The Flashrom log is as follows:
pi@raspberrypi:~ $ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -c "W25Q64.V" -V -w GMS_64M.bin
flashrom v0.9.9-r1954 on Linux 4.9.26v7-aufs (armv7l) flashrom is free software, get the source code at https://flashrom.org
flashrom was built with libpci 3.2.1, GCC 4.9.2, little endian Command line (7 args): flashrom -p linux_spi:dev=/dev/spidev0.0 -c W25Q64.V -V -w GMS_64M.bin Calibrating delay loop... OS timer resolution is 3 usecs, 595M loops per second, 10 myus = 10 us, 100 myus = 101 us, 1000 myus = 1045 us, 10000 myus = 9999 us, 12 myus = 12 us, OK. Initializing linux_spi programmer Using device /dev/spidev0.0 The following protocols are supported: SPI. Probing for Winbond W25Q64.V, 8192 kB: probe_spi_rdid_generic: id1 0xef, id2 0x4017 Found Winbond flash chip "W25Q64.V" (8192 kB, SPI) on linux_spi. Chip status register is 0x00. This chip may contain one-time programmable memory. flashrom cannot read and may never be able to write it, hence it may not be able to completely clone the contents of this chip (see man page for details). Reading old flash chip contents... done. Erasing and writing flash chip... Trying erase function 0... 0x000000-0x000fff:E FAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x00000fff: 0x9b8 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 1... 0x000000-0x007fff:EFAILED at 0x000001c1! Expected=0xff, Found=0x80, failed byte count from 0x00000000-0x00007fff: 0x4a3f ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 2... 0x000000-0x00ffff:EFAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0x976e ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 3... 0x000000-0x7fffff:EFAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x007fffff: 0x4b5b41 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 4... 0x000000-0x7fffff:EFAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x007fffff: 0x52483f ERASE FAILED! Looking for another erase function. No usable erase functions left. FAILED! Uh oh. Erase/write failed. Checking if anything has changed. Reading current flash chip contents... done. Apparently at least some data has changed. Your flash chip is in an unknown state. Please report this on IRC at chat.freenode.net (channel #flashrom) or mail flashrom@flashrom.org, thanks!
Hi,
On 15.09.2017 18:56, junkheap--- via flashrom wrote:
I am trying to write to a Winbond W25Q64FVSIG EEPROM (SOIC-8) using Flashrom and a Raspberry Pi 3 (running up to date Raspbian). But I receive the message "ERASE FAILED!".
I am using the shortest wires which are practical to connect to the Raspberry Pi (~10CM) and I have checked many times that I have connected to the correct GPIO pins. To make sure that there is a good connection, I abandoned the clip I was using and have soldered the EEPROM to the pads on a daughterboard (designed for the purpose). The wires I am using have factory-fitted female terminals on both ends and connect tightly to the GPIO pins on the RPI and pin head on the daughterboard.
From what I have found some people have flashed this model of EEPROM successfully using Flashrom, but others have encountered the same problem. I have not been able to find a solution. If anyone can offer assistance or advice I would me most grateful. Thank you.
I see two possible causes:
1. You probably didn't connect all pins of the flash chip. You have to pull /HOLD and /WP high (connect them to 3V3, preferably through some resistor) to succeed.
2. You run the SPI interface at a too high clock. As you didn't supply a `spispeed` argument to the linux_spi programmer, it will at run at some (to me unknown) default speed.
Nico