Skip to contentSkip to conversation

NAND fail testing

DISCUSSION David A. Marlin 5 participants 8 messages Jan 13, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Is there a simple way (using existing drivers and utilities) to "wear out" one byte on a NAND type chip by repeatedly rewriting a single byte (single address)?

I want to cause a single byte failure on a chip in order to perform tests on erase and write error processing, but I only see how to write a 'page' of data, not a single address.

Thank you,

d.marlin

#1 lore raw

I suggest you read the Toshiba NAND design guide before you try things like this. Google for "toshiba nand flash applications design guide"

NAND is always written in a per-page mode, even if you only change a single byte. Attempting what you propose will not only wear the single byte, but will wear the whole page and block.

IMHO the best way to do testing is to emulate a device in RAM. It is relatively simple to modify RAM contents and force the higher level to do its test stuff. Trying to do it with a real hardware failure will take a long time and is far harder to reproduce etc.

Quoted 18 lines · David A. Marlin

Is there a simple way (using existing drivers and utilities) to "wear out" one byte on a NAND type chip by repeatedly rewriting a single byte (single address)?

I want to cause a single byte failure on a chip in order to perform tests on erase and write error processing, but I only see how to write a 'page' of data, not a single address.

Thank you,

d.marlin

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#2 lore raw

Charles:

Thank you for your reply. Some additional information, the chips I am using are Renesas AG-AND (HN29V1G91T-30). It was a note from Renesas that suggested this approach to permit erase/write fail testing. I think this chip permits a "Random Data Input" operation that would permit writing a single byte, but I need to confirm this. Since this does not appear to be a feature shared with other NAND/AND chips, it seems I may not be able to use our current driver/utilities to accomplish it (without modification).

Quoted 5 lines · Charles Manning

I suggest you read the Toshiba NAND design guide before you try things like this. Google for "toshiba nand flash applications design guide"

NAND is always written in a per-page mode, even if you only change a single byte. Attempting what you propose will not only wear the single byte, but will wear the whole page and block.

IMHO the best way to do testing is to emulate a device in RAM. It is relatively simple to modify RAM contents and force the higher level to do its test stuff. Trying to do it with a real hardware failure will take a long time and is far harder to reproduce etc.

Agreed, but part of the testing is reading error status information back from the chips after the erase/write fail and determining if hardware ECC is possible. I have not tried to emulate this device in RAM, but I don't think it is a viable option for me since producing and reading these error codes are part of the testing I need to perform.

Thanks again,

d.marlin

#3 lore raw
In reply to David A. Marlin
Quoted 8 lines · David A. Marlin

Is there a simple way (using existing drivers and utilities) to "wear out" one byte on a NAND type chip by repeatedly rewriting a single byte (single address)?

I want to cause a single byte failure on a chip in order to perform tests on erase and write error processing, but I only see how to write a 'page' of data, not a single address.

We have blocked the access to short writes. You can do the following:

Erase a block from userspace with flash_erase
Write a page of all 0xff except one byte to the first page using nandwrite

Repeat until you get an error

tglx

#4 lore raw
Quoted 8 lines · Thomas Gleixner

We have blocked the access to short writes. You can do the following:

Erase a block from userspace with flash_erase
Write a page of all 0xff except one byte to the first page using nandwrite

Repeat until you get an error

Would this not still 'write' all bytes in the page (even though they are 0xff and unchanged), causing them to also wear and possibly fail?

d.marlin

#5 lore raw
Quoted 5 lines · David A. Marlin
Quoted 3 lines · Thomas Gleixner

We have blocked the access to short writes. You can do the following:

Quoted 8 lines
Quoted 5 lines

Erase a block from userspace with flash_erase
Write a page of all 0xff except one byte to the first page using nandwrite

Repeat until you get an error

Would this not still 'write' all bytes in the page (even though they are 0xff and unchanged), causing them to also wear and possibly fail?

Since the write is only from 1 -> 0 the page write command always "writes" all bytes regardless of the number of bytes you have supplied before.

tglx

#6 lore raw
Quoted 10 lines · Thomas Gleixner
Quoted 9 lines · David A. Marlin
Quoted 7 lines · Thomas Gleixner

We have blocked the access to short writes. You can do the following:

Erase a block from userspace with flash_erase
Write a page of all 0xff except one byte to the first page using nandwrite

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Repeat until you get an error

Would this not still 'write' all bytes in the page (even though they are 0xff and unchanged), causing them to also wear and possibly fail?

Since the write is only from 1 -> 0 the page write command always "writes" all bytes regardless of the number of bytes you have supplied before.

Even with taking into account this, we can not just safely rewrite the same page lots of times. If we do so, we can not assume anything about its content, even if we write the same every time. Correct me if I'm wrong.

Quoted 9 lines

tglx

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

#7 lore raw
In reply to David A. Marlin
Quoted 4 lines

Is there a simple way (using existing drivers and utilities) to "wear out" one byte on a NAND type chip by repeatedly rewriting a single byte (single address)?

As I understand, you can write over an already-written page with new values. Could you continually write the same data to a page, except for the byte that you want to wear out?

I think because of the way NAND works, with a 512 byte buffer that goes all at once into NAND that you can't do much other than something like this.

Mike