Hi,

Sometimes flashrom identifies the flash chip but gives a "RDID byte 0 parity violation". When the probing process ends without RDID error, the chip status register is incorrectly read as "BF".
After checking the eeprom board one hundred times, i've plugged a logic analizer into spi lines and logged two ID procceses, one with RDID error and the other with "BF" status register read.

This is the part of the probbing sequence related to SST25VF040B which gives "RDID byte 0 parity violation".
    flashrom -p ft2232_spi:type=jtagkey,port=A -V
MISO Data     0x9F
    MOSI Data     0xBF
MISO Data     0xFF
    MOSI Data     0x25
MISO Data     0xFF
    MOSI Data     0x8D
MISO Data     0xFF
    MOSI Data     0xFF
MISO Data     0xAB
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xBF
MISO Data     0x00
    MOSI Data     0x8D
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x90
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xBF
MISO Data     0x00
    MOSI Data     0x8D
MISO Data     0x00
    MOSI Data     0xFF
And this one for the correct ID, but incorrectly read status register:
    flashrom -p ft2232_spi:type=jtagkey,port=A -V
MISO Data     0x9F
    MOSI Data     0xBF
MISO Data     0xFF
    MOSI Data     0x25
MISO Data     0xFF
    MOSI Data     0x8D
MISO Data     0xFF
    MOSI Data     0xFF
MISO Data     0x05
    MOSI Data     0x1C
MISO Data     0xFF
    MOSI Data     0x1C
MISO Data     0xFF
    MOSI Data     0xFF
MISO Data     0xAB
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xBF
MISO Data     0x00
    MOSI Data     0x8D
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x90
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xFF
MISO Data     0x00
    MOSI Data     0xBF
MISO Data     0x00
    MOSI Data     0x8D
MISO Data     0x00
    MOSI Data     0xFF

As you can see, the difference starts after reading the ID (0xBF 0x25 0x8D). Sometimes flashrom sends 0xAB, the eeprom answer with a chunk of 0xFF's and shows a RDID error, and on some ocasions, it sends 0x05 to get the status register, so the eeprom answer 0x1C twice.

Appart from the RDID error, flashprog is reading 0xBF instead of 0x1C when asking for the status register. It seems to have some problem with FTDI buffers or something related, because the electric communication is perfect. The flash chip is answering as expected.

Any idea?

Regards,
Carlos


On 16/12/10 22:56, Carlos C wrote:
Hi,

I'm testing an Amontec JtagKey-tiny interface for programming a SST25VF040B eeprom i'm using in a project.
The Jtagkey-tiny is detected without problems, it reads the eeprom ID and is detected.

But when i try to read it contents, i get an error:

$ ./flashrom -p ft2232_spi:type=jtagkey,port=A -Vr test.bin
flashrom v0.9.3-r1205 on Linux 2.6.32-26-generic (i686), built with libpci 3.0.0, GCC 4.4.3, little endian
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OS timer resolution is 2 usecs, 1000M loops per second, 10 myus = 11 us, 100 myus = 91 us, 1000 myus = 904 us, 10000 myus = 9823 us, 8 myus = 10 us, OK.
Initializing ft2232_spi programmer
Using device type Amontec JTAGkey interface A
Set clock divisor
SPI clock is 2.000000MHz
No loopback of TDI/DO TDO/DI
Set data bits
[Probings ommited]
Probing for SST SST25VF040B, 512 KB: probe_spi_rdid_generic: id1 0xbf, id2 0x258d
Chip status register is bf
Chip status register: Block Protect Write Disable (BPL) is set
Chip status register: Auto Address Increment Programming (AAI) is not set
Chip status register: Bit 5 / Block Protect 3 (BP3) is set
Chip status register: Bit 4 / Block Protect 2 (BP2) is set
Chip status register: Bit 3 / Block Protect 1 (BP1) is set
Chip status register: Bit 2 / Block Protect 0 (BP0) is set
Chip status register: Write Enable Latch (WEL) is set
Chip status register: Write In Progress (WIP/BUSY) is set
Resulting block protection : all blocks
Found chip "SST SST25VF040B" (512 KB, SPI) at physical address 0xfff80000.
[More probings ommited]
[UNTESTED status warning ommited]
Some block protection in effect, disabling
Missing status register write definition, assuming EWSR is needed
Reading flash... ftdi_write_data: -110, usb bulk write failed
send_buf failed at end: 1
Read operation failed!
FAILED.

As you can see, i tried to low the SPI speed to 2MHz.
Any idea? I know this part is marked as UNTESTED, but it should work as SST25VF080B do.

Thanks,
Carlos