Nand Flash controller hardware ECC introduction

ECC generation method

ECC is an algorithm for verification of proper transfer of data between the memory, the hardware sub ECC ECC two algorithms and software, hardware realized by the hardware circuit (ECC generator) in the Nand Flash controller S3C2410 ECC.

 

ECC generator during operation

When data is written to the Nand flash memory, ECC generator generates an ECC code automatically after completion of writing data, and drops it into ECC0-ECC2. When the read data will also Nand Flash after the read data is completed, which is automatically generated ECC codes into ECC0-ECC2 them.

 

ECC use

When writing data, each page can be generated after the data written into the ECC code OOB specified location (Byte 6) go, thus completing the storage of ECC codes. Thus when reading out page data, the required data is read out and the whole OOB, and then specify the location of the ECC code and comparing the read data in ECC code actually generated ECC0-ECC1, if equal, the read correctly , if not equal, read errors need to be re-read.

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11105692.html