Hi,
I modifed PDK_c6657_1_1_2_6 nand driver for 16bit NAND flash. The Nand page read and page write wokrs. And I would like to know how to test the 4-bit ECC detection and correction.
I tried the following --
1. Erase a Nand page
1. Wirte a 256-words buffer { 0,1,2,3...255} into the same Nand page--following steps in SPRUZ3A page 3-7, 4-bit ECC calulation Writes (step 1-5)
2. Read the same Nand page. --following steps in SPRUZ3A page 3-7, 4-bit ECC calulation Reads (step 1-13)
3. Modify the above buffer, intentionally change one of words to 0, (Ex, { 0,1,2,3...255}), Overwrite the same Nand page with the modified buffer. During the overwrite, skip all ECC calulation and store steps, (Ex, with SPRUZ3A page 3-7, 4-bit ECC calulation Writes , perform step 2 only, skip step 1,3,4,5)
4. Read the same Nand page. --following steps in SPRUZ3A page 3-7, 4-bit ECC calulation Reads (step 1-13).
Since step 3 perform a overwrite without modifying the stored parity in sapre location, I expect that in step 4 it can detect and restore the overwitten word with the parity calculated for the original buffer. The test show that it can detect the address of the overwritten word correctly, but fail to restore the original data.
Please advice what's the correct way to test the ECC.
GanZ