NAND Flash reader using FTDI


I'm trying to read data off a Hynix NAND Flash chip.

Ive soldered the NAND Flash onto a break out board and connected it to my FT2232H FTDI.

I'm using the following software to read the NAND Flash:

However, I get the following output when I run it:

C:\NAND>python -i
Name:           NAND 128MiB 3,3V 8-bit
ID:             0xf1
Page size:      0x0
OOB size:       0x0
Page count:     0x0
Size:           0x80
Erase size:     0x0
Options:        1
Address cycle:  4
Manufacturer:   Traceback (most recent call last):
  File "", line 93, in <module>
  File "C:\NAND\", line 314, in DumpInfo
    print 'Manufacturer:\t',self.Manufacturer
AttributeError: NandIO instance has no attribute 'Manufacturer'


I have double checked my wiring and I believe it's all correct.

Would anyone have any advice to explain why it's not being recognized? Have I busted the NAND Flash?

Best Answer

The code you are using, specifically attempts to match a variety of manufacturer IDs.

    if id[0]==0x98:
    if id[0]==0xec:
    if id[0]==0x04:
    if id[0]==0x8f:
        self.Manufacturer="National Semiconductors";
    if id[0]==0x07:
    if id[0]==0x20:
        self.Manufacturer="ST Micro";
    if id[0]==0xad:
    if id[0]==0x2c:
    if id[0]==0x01:
    if id[0]==0xc2:

Likely yours is not being matched either because it is misread, or unknown, and this leaves the field undefined, causing the error you see. I would suggest you try preceding these "if" statement with a default, ie:

    if id[0]==0x98:

Going a step further you could try something like this (completely untested):

    self.Manufacturer=hex(id[0])+" is unrecognized";
    if id[0]==0x98:

According to your data sheet, the code for your chip should be 0xad which is in the list, so likely these changes won't actually get things working, but will get you past that particular program crash and so perhaps allow you to learn more.

Related Topic