ECC in NAND flash memory
The modern flash devices have a very common problem of data integrity caused by low quality of NAND chips. This problem is well known as “Bit errors”. When bit errors appear on the area where file is stored, it gets corrupted and unreadable. It’s very noticeable on multimedia files.
There are several causes of bit errors (cell-to-cell interference, read disturb, internal noise) and several ways to reduce them (Error Correction Codes, power manipulations, read-retry). The ECC is the most effective way to protect data and correct errors, so all modern flash controllers (external and embedded) have built-in ECC engine. When data is written to NAND, controller generates special checksum and write it to the spare area of page. Then, when data is read, controller test data integrity of every page and correct it if necessary.
There are several types of ECC codes, but only BCH type is widely used in flash devices. This algorithm is universal and has a set of parameters. These parameters are preprogrammed in the controller’s FW and differ from model to model. When controller gets damaged, all these parameters are lost, but checksum of ECC still stays inside every page of NAND chip.
The Visual Nand Reconstructor can automatically find parameters of code and do error correction using remaining checksums. The error correction via ECC algorithm must be applied on the physical image once it’s extracted (or in case of bad columns after removal). When ECC/BCH element is connected to physical image, it’s only parameter must be adjusted – page size. When it’s done, auto analysis of code can do the rest of job. The video below shows detailed instructions on how it works.
Case #1 Video tutorial
[swf src=”https://rusolut.com/wp-content/uploads/2016/04/ECCcorrection1.swf” width=1080 height=500][/swf]