Hi guys.
I sent you my issue yesterday and after that I was playing a bit with upgrading the flashrom version and other settings. I'm trying to write the Macronix "MX25L3205D/MX25L3208D" and "Micron/Numonyx/ST N25Q064..3E". My exact Macronix chip is MX25L3205DM21.
First, when getting a fresh flashrom, the make instructions are not quite clear for Xubuntu. When I've added the source from subversion, make was asking for libusb-compat saying 'Checking for libusb-0.1/libusb-compat headers... not found.'. I've installed some usb related packages and libs mentioned in your README, updated the apt-get and make worked. In which library comes the libusb-compat I've got no idea, I've installed most usb related -dev packages through Ubuntu Software center as well. I've got installed now libusb-dev, libusb-0.1-4, libusb-1.0-0, libusb-1.0-0-dev, ftdi-eeprom, usbutils amongst others.

Another issue is that for the MX25L3205DM21, ERASE was giving me same errors with the latest flashrom anyway. After setting two pins 7 (HOLD#) and 8 (Vdd) to +5V on Bus Pirate I successfully written two flash chips. My Bus Pirate is connected through the powered USB2.0 hub. Since I've got five flash chips from the same package, I've decided to write them all, and without changing nothing the flashrom was refusing to even detect two remained chips! So, what I did, I switched Vdd to +V3.3, accessed the flash, it became detectable, and then I switched the jumper on my breadboard back to +5V. It worked with one chip only and it was successfully written and verified. The remained two chips I was able to access with 7-HOLD# connected to +5V and the Vdd to +3.3V. But the write fails, although chips are detectable. ERASE always fails with the same result for the Functions #2 and #3 but the Erase function #1 is always different. The values may vary, but again they remain the same for #2 and #3 Erase functions.

My question is: is there something wrong with these chips, or the power supply, or both?
The two remained chips gave me the message I've posted in the end of this email. The only differences between two is the byte count, that may vary. But the range is always the same.


Another thing that happened to me. I had a strange issue when the Verify function was failing after successfully write the Micron/Numonyx/ST N25Q064..3E chip. I'm sure that the dump itself is OK as I've used it on the device and it works, and more than that, the Verification doesn't fail on the chip that's soldered on the device. But it fails on other three chips that are brand new unsoldered. In any case, after dumping the EFI back from the new chips, the SFV checksum remains the same as of master EFI dump. Why the verification fails when it's written onto chips is another unexplainable issue that I've faced.


At last, here's the copy of the ERASE errors from when trying to write onto MX25L3205DM21:
=====================================
Calibrating delay loop... OS timer resolution is 1 usecs, 3884M loops per second, 10 myus = 10 us, 100 myus = 99 us, 1000 myus = 996 us, 10000 myus = 10023 us, 4 myus = 4 us, OK.
Initializing buspirate_spi programmer
Detected Bus Pirate hardware v3.a
Detected Bus Pirate firmware 6.2
Using SPI command set v2.
SPI speed is 8MHz
Raw bitbang mode version 1
Raw SPI mode version 1
The following protocols are supported: SPI.
Probing for Macronix MX25L3205D/MX25L3208D, 4096 kB: probe_spi_rdid_generic: id1 0xc2, id2 0x2016
Found Macronix flash chip "MX25L3205D/MX25L3208D" (4096 kB, SPI) on buspirate_spi.
Chip status register is 0x00.
Chip status register: Status Register Write Disable (SRWD, SRP, ...) is not set
Chip status register: Bit 6 is not set
Chip status register: Block Protect 3 (BP3) is not set
Chip status register: Block Protect 2 (BP2) is not set
Chip status register: Block Protect 1 (BP1) is not set
Chip status register: Block Protect 0 (BP0) is not set
Chip status register: Write Enable Latch (WEL) is not set
Chip status register: Write In Progress (WIP/BUSY) is not set
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:EFAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x00000fff: 0xf18
ERASE FAILED!
Reading current flash chip contents... done. Looking for another erase function.
Trying erase function 1... 0x000000-0x00ffff:EFAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xf727
ERASE FAILED!
Reading current flash chip contents... done. Looking for another erase function.
Trying erase function 2... 0x000000-0x3fffff:EFAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x003fffff: 0x368887
ERASE FAILED!
Reading current flash chip contents... done. Looking for another erase function.
Trying erase function 3... 0x000000-0x3fffff:EFAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x003fffff: 0x368887
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!
Raw bitbang mode version 1
Bus Pirate shutdown completed.
=====================================

Any help would be greatly appreciated.

Thank you,
Sergio.


On Sat, Jun 11, 2016 at 9:40 PM, Sergio <businessnzd@gmail.com> wrote:
Hi. When trying to delete or rewrite the flash I'm getting following:
==================================================
Found Macronix flash chip "MX25L3205" (4096 kB, SPI) on buspirate_spi.
Erasing and writing flash chip... Trying erase function 0... 0x000000-0x000fff:EERASE FAILED at 0x00000000! Expected=0xff, Read=0x00, failed byte count from 0x00000000-0x00000fff: 0x1000
ERASE FAILED!
Reading current flash chip contents... done. Looking for another erase function.
Trying erase function 1... 0x000000-0x000fff:EERASE FAILED at 0x00000000! Expected=0xff, Read=0x00, failed byte count from 0x00000000-0x00000fff: 0x1000
ERASE FAILED!
Reading current flash chip contents... done. Looking for another erase function.
Trying erase function 2... 0x000000-0x3fffff:EERASE FAILED at 0x00000000! Expected=0xff, Read=0x00, failed byte count from 0x00000000-0x003fffff: 0x400000
ERASE FAILED!
Reading current flash chip contents... done. Looking for another erase function.
Trying erase function 3... 0x000000-0x3fffff:EERASE FAILED at 0x00000000! Expected=0xff, Read=0x00, failed byte count from 0x00000000-0x003fffff: 0x400000
ERASE FAILED!
Looking for another erase function.
No usable erase functions left.
FAILED!
Your flash chip is in an unknown state.
==================================================

Any help or suggestion?

SPI Programmer:
Bus Pirate v3.a
Firmware v6.2-beta1 r1981  Bootloader v4.4


Cheers.