0

I used nandtest utility to test flash memory. After test, flash memory data was damaged. First flash memory card data was damaged by this command:

nandtest /dev/mtd3

Then, I saw C resources of nandtest from git, and I have found, that this call should work for me:

nandtest -k /dev/mtd3

But, flash memory data was damaged again. This is output of nandtest call:

ECC corrections: 26
ECC failures   : 696
Bad blocks     : 0
BBT blocks     : 0
00100000: reading... 
 1 bit(s) ECC corrected at 00100000
001a0000: reading... 
 1 bit(s) ECC corrected at 001a0000
00f40000: reading... 
 2 bit(s) ECC corrected at 00f40000
01d40000: reading... 
 1 bit(s) ECC corrected at 01d40000
02300000: reading... 
ECC failed at 02300000
02ac0000: reading... 
 1 bit(s) ECC corrected at 02ac0000
03e60000: reading... 
 1 bit(s) ECC corrected at 03e60000
065a0000: reading... 
 1 bit(s) ECC corrected at 065a0000
06e60000: reading... 
 1 bit(s) ECC corrected at 06e60000
0b560000: reading...  
 1 bit(s) ECC corrected at 0b560000
0c040000: reading...  
 2 bit(s) ECC corrected at 0c040000
0cc40000: reading... 
 1 bit(s) ECC corrected at 0cc40000
0cd80000: reading... 
 1 bit(s) ECC corrected at 0cd80000 
0ce40000: reading...  
 1 bit(s) ECC corrected at 0ce40000
0da00000: reading...  
 1 bit(s) ECC corrected at 0da00000
0daa0000: reading... 
 1 bit(s) ECC corrected at 0daa0000
0f160000: reading... 
ECC failed at 0f160000
0f5e0000: reading... 
ECC failed at 0f5e0000
0f840000: reading... 
ECC failed at 0f840000
14080000: reading... 
 1 bit(s) ECC corrected at 14080000
15460000: reading... 
 1 bit(s) ECC corrected at 15460000
15ae0000: reading... 
 1 bit(s) ECC corrected at 15ae0000
15e40000: reading... 
 1 bit(s) ECC corrected at 15e40000
161a0000: reading... 
 2 bit(s) ECC corrected at 161a0000
17740000: reading...  
 1 bit(s) ECC corrected at 17740000
17900000: reading... 
 1 bit(s) ECC corrected at 17900000
1a540000: reading... 
 1 bit(s) ECC corrected at 1a540000
1a860000: reading... 
 1 bit(s) ECC corrected at 1a860000
1aee0000: reading... 
 1 bit(s) ECC corrected at 1aee0000
1b4e0000: checking...
Finished pass 1 successfully

Does anyone know, why this call of nandtest utility damaged data on my card? Is any way how to call nandtest utility to have no damaged data?

  • I have absolutely no idea what this tool is, but the #1 thing to check for is if the flash driver sets the pre-scaler clock correctly. If you screw this up when writing a flash/eeprom driver, you can actually damage the memory. – Lundin Feb 22 '18 at 16:17
  • @Lundin. Memory was not damaged, only data. Basically, this utility goes block by block in memory and reads data, writes data, reads data, compares, whether are identical and writes original data, reads original data and compare whether are identical. This should be save process. You can find resoureces at: [https://github.com/vamanea/mtd-utils/blob/master/nandtest.c](https://github.com/vamanea/mtd-utils/blob/master/nandtest.c) –  Feb 23 '18 at 05:32
  • Is this a TI board, by any chance? They have some known bugs/inconsistencies between u-boot and Linux code. – tofro Feb 23 '18 at 20:19

1 Answers1

0

It won't harm your flash. The error you saw just reveals your flash begins worn-out. It is reported by flash driver.

-k option didn't do "the correction" as you think. It just restore data that previously existed on flash after testing.

Cà phê đen
  • 1,883
  • 2
  • 21
  • 20