NAND Flash reader using FTDI

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:
https://github.com/ohjeongwook/DumpFlash

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

C:\NAND>python DumpFlash.py -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 "DumpFlash.py", line 93, in <module>
    flash_util.io.DumpInfo()
  File "C:\NAND\FlashDevice.py", line 314, in DumpInfo
    print 'Manufacturer:\t',self.Manufacturer
AttributeError: NandIO instance has no attribute 'Manufacturer'

C:\NAND>

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 FlashDevice.py attempts to match a variety of manufacturer IDs.

    if id[0]==0x98:
        self.Manufacturer="Toshiba";
    if id[0]==0xec:
        self.Manufacturer="Samsung";
    if id[0]==0x04:
        self.Manufacturer="Fujitsu";
    if id[0]==0x8f:
        self.Manufacturer="National Semiconductors";
    if id[0]==0x07:
        self.Manufacturer="Renesas";
    if id[0]==0x20:
        self.Manufacturer="ST Micro";
    if id[0]==0xad:
        self.Manufacturer="Hynix";
    if id[0]==0x2c:
        self.Manufacturer="Micron";
    if id[0]==0x01:
        self.Manufacturer="AMD";
    if id[0]==0xc2:
        self.Manufacturer="Macronix";

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:

    self.Manufacturer="Unrecognized";
    if id[0]==0x98:
        self.Manufacturer="Toshiba";

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

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

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