Hello Dominik,

Sorry for the late reply. We had a similar problem[1] with linux_mtd.
It's fixed, but the last release was a long time ago. Maybe, linux_spi
has the same problem. It seems like OS reads ahead and returns cached
data instead of actual data. 

Have you checked if anything has changed? You can do it using the
following commands:

```
flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2000 -r old.bin
flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2000 -E -n
flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2000 -r erased.bin
```

Did any of these commands fail? Please look inside erased.bin, it
should be filled with "0xff" values.

--
Joursoir

[1]https://github.com/flashrom/flashrom/commit/a2f2f3f5ee1bb9c953f098f019c3ad09657cba38

On Tue, 23 Aug 2022 19:43:01 +0200
domim...@web.de wrote:

> Dear Flashrom-Team,
>  
> Currently, I am trying to progam my Macronix MX25L512E flash chip.
> Sadly, I always get this error message, where the program can not
> write to the chip or erase it. The comman was "flashrom -p
> linux_spi:dev=/dev/spidev0.0,spispeed=2000 -w new.bin". Here is the
> error message: flashrom v1.2 on Linux 5.15.56-v8+ (aarch64) flashrom
> is free software, get the source code at https://flashrom.org Using
> clock_gettime for delay loops (clk_id: 1, resolution: 1ns). Found
> Macronix flash chip "MX25L512(E)/MX25V512(C)" (64 kB, SPI) on
> linux_spi. Reading old flash chip contents... done. Erasing and
> writing flash chip... FAILED at 0x00000ffb! Expected=0xff,
> Found=0x7f, failed byte count from 0x00000000-0x00000fff: 0x1 ERASE
> FAILED! Reading current flash chip contents... done. Looking for
> another erase function. FAILED at 0x00000ffb! Expected=0xff,
> Found=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x7 ERASE
> FAILED! Reading current flash chip contents... done. Looking for
> another erase function. FAILED at 0x00000ffb! Expected=0xff,
> Found=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x8 ERASE
> FAILED! Reading current flash chip contents... done. Looking for
> another erase function. FAILED at 0x00000ffb! Expected=0xff,
> Found=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x7 ERASE
> FAILED! Reading current flash chip contents... done. Looking for
> another erase function. FAILED at 0x00000ffb! Expected=0xff,
> Found=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x7 ERASE
> FAILED! Reading current flash chip contents... done. Looking for
> another erase function. Looking for another erase function. 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!
>  
> Thank you in advance for the help!
>  
> Sincerly,
>  
> Dominik Möller
_______________________________________________
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org

Reply via email to