On 9/23/18 4:11 PM, Andrej Gornik wrote:
I have problem with flashing W25Q256JVFQwith latest git version of flashrom. [...] Erasing and writing flash chip... FAILED at 0x0025d000! Expected=0xff, Found=0xf0, failed byte count from 0x0025d000-0x0025dfff: 0x31b ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. FAILED at 0x006dc800! Expected=0xff, Found=0x48, failed byte count from 0x006d8000-0x006dffff: 0x2a7 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Erase/write done. Verifying flash... FAILED at 0x002bbe59! Expected=0x3b, Found=0x00, failed byte count from 0x00000000-0x01ffffff: 0xa114
As it fails at different locations, the problem seems to be arbitrarily failing reads (flashrom has to read to verify that an erase succeeded). You should try to read the whole chip and verify (flashrom -v) the result multiple times. Only if the physical setup is good enough for valid reads, flashrom can work reliably.
You can also try to reduce the `spispeed` (see manpage) to mitigate a bad connection. But as the chosen speed (2MHz) is already rather low, I would check the wiring (wires shouldn't be too long, see also ).
Hope that helps, Nico