How to verify the ECC code for NAND Flash do work

Thomas Gleixner tglx at linutronix.de
Tue Mar 9 02:41:30 EST 2004


On Tuesday 09 March 2004 06:47, Shen Aaron-r62966 wrote:
> Hello all,
>
>   I have modified the ECC part of code in my Linux system, but I don't know
> how to confirm that it does work. 

Why did you modify the code ? It is stable and tested.

> One way I'm thinking of is to get a NAND
> Flash with bad block somewhere inside it. 

The bad block is not related to ECC. Bad blocks are skipped. They aren't read, 
writted, erased.

>1. A suitable probram to create a period of bad block
> inside a normal NAND Flash is needed. 

You have to set the bad block marker. This can be done from userspace. Have a 
look at utils/nandwrite.c

> What's the result if the ECC part fails?

The raw data on flash are returned to the caller with an errorcode. If ECC 
fails completely then the data will be lost in the most cases.

-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de




More information about the linux-mtd mailing list