nand ecc

Iwo Mergler Iwo.Mergler at netcommwireless.com
Sun Jan 11 16:31:31 PST 2015


> Hamming  Mode:
> What will happen if the data has more than two bit errors for codeword?
> Will the nand_correct_data() function returns uncorrectable ecc error ?

Hamming is said to correct one bit error and detect 2. That is, if you have
two bit errors, you are guaranteed to get the "uncorrectable error" error.

More than two bit errors will get reported as no errors, correctable bit errors
or uncorrectable bit errors, pretty much randomly.

It is possible to have, for instance, 3 bit errors that Hamming will report as
one correctable error. When corrected, you will have 4 bit errors.

> BCH mode:
> Assume that the BCH block can correct upto 24bit errors. what will
> happen if the data has more than 24 bit errors?
> Will the nand_bch_correct_data() function returns uncorrectable ecc error?

The situation is similar to the one above. Up to 24 bit errors will be corrected,
25 will be detected and more errors may report anything.


Think of it this way - you have a small number of ECC bits covering a larger
number of data bits. Together they have to form a valid code word.

This means that for every particular ECC bit combination, there are a large
number of possible data bit patterns that form valid code words. If you apply
a sufficiently large number of bit errors to one data pattern, you can reach
another valid one.

The trick of all error correcting codes is to pick the valid code words such that
the number of differing bits (hamming distance) is maximised. If your number
of bit errors exceeds the half way point to the next valid code word, your
error correction will assume that the other code word is the correct one.


Best regards,

Iwo

______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________



More information about the linux-mtd mailing list