|
楼主 |
发表于: 2019-7-19 21:10:21
|
显示全部楼层
Some more tests results :
Using a file with only 0x00s in it, then the software output Bad block detected for every badblock (seems like the badblock information is read into the image file, instead of being read from the actual chip)
Using a file from a dumped valid nand (containing data + oob), the same thing happen (seems like the badblock marker is not looking at the right place for the device. Nand256w3a uses the 5th byte in the OOB to mark bad block). In our DSP (Blackfin) and in the linux code that is used, the ECC for these chips is written in the fist 3 bytes and in the 9th to 11th bytes (3 bytes of ECC per 256 bytes of data). That way, if the software look for a bad block marker at offset 0 (which is a common location for marker, mostly used for large pages NAND) in the dump file (which it should not in my opinion), it will most likely see an value different from 0xFF.
It seems to me that :
* Badblock information should be read from the device at first time writing to a different block
* Badblock information should not be read from the dump file
* Badblock location for small page devices (pages < 2048) should be located at offset 5th in the OOB, except for devices which datasheet gives an other location
* Writing data to a nand should be available in 2 ways : 1/ Raw write (image file therefore contain the data and OOB content) 2/ Data mode : image file only contains pages data, the OOB is computed and written by the software. The latest might be complex to devellop (even if most code is available from the linux source code), because the software would require some advanced settings (ECC algorythm and settings, OOB layout to use).
Please let me know if you can help me at least to write the dumped image from a working product to the new nands (the one containing both pages data and OOB content). This one should work without throwing bad block detection messages.
Regards, |
|