Backgroud: Now we are developping nand driver run VxWorks system. The nand driver should realize by ourselves not by third-party(VxWorks site). Our production use TI am3352 cpu.
The NAND parameter like below:
page size is 4096byte, spare area is 256byte,8 bit ECC for each 512 byte is required.
When use BCH16 for ECC and ELM for error bit check. I have one question: In order to find the error bit, the ecc result should written into the ELM_SYNDROME_FRAGMENT register. The ECC result is which ECC result:(1) keep in nand OOB area, which was previous written when wrote data into nand and calculated the ECC.
(2) Read page data area not include OOB area calculate the ECC result.
(3)Read data area then read oob area, finally calculate ECC result.
I once try to change some bit in data area and OOB area is not changed. Pass the old ECC result to related ELM_SYNDROME_FRAGMENT register. The ELM_LOCATION_STATUS register return 0. In other words, ECC error-location process failed.