Hello NXP Community,
can anybody tell me what actual error correcting code algorithm, parameters, and possibly other magic ingredients are used in i.MX28 application processors to calculate ECCs for NAND memory?
I have a NAND dump of an embedded device using a MCIMX283DVM4B. If my understanding of the i.MX28 Applications Processor Reference Manual regarding the firmware configuration block (FCB) is correct, my specific target device uses the following configuration:
page data size = 2048 bytes
total page size = 2112 bytes
sectors per block = 64
ECC block N = 4 (BCH8)
ECC block N size = 512 bytes
ECC block 0 = 4 (BCH8)
ECC block 0 size = 512 bytes
Up to now, I was not able to correctly calculate any of the BCH ECCs contained in my NAND dump using typical polynoms (e.g. 0x201B) and reversing bits of data bytes for any corresponding block which is a show stopper for my intended data recovery.
During my Internet research concerning hardware-generated ECCs for NAND memory, I stumbled upon some similar asked questions and threads, some of them several years old, like NAND Flash - encoding data with hardware ECC unit - generator polynomial , but nowhere enough information, or also appreciated source code, was provided to solve my actual problem.
I really hope that somebody can help me to correctly calculate and use the BCH error correcting codes for data recovery purposes regarding my i.MX28-based device.
Hi Bertha
one can check sect.12.12 NAND Boot Mode i.MX28 Reference Manual
https://www.nxp.com/docs/en/reference-manual/MCIMX28RM.pdf
use mfg tool for programming:
Programmers (Flash, etc.)
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello igorpadykov,
thank you for your quick response. Unfortunately, your provided information does not help to solve my problem.
I have checked sect.12.12 NAND Boot Mode of the i.MX28 Reference Manual https://www.nxp.com/docs/en/reference-manual/MCIMX28RM.pdf and the whole document does not contain the information I need to use or correctly calculate the ECCs found in my NAND dump.
I have also checked the programming tools of the i.MX28 Evaluation Kit|NXP, but to my understanding, the i.MX Manufacturing Tool (MfgTool) and other utilities do not generate ECCs themselves but rely on the hardware ECC algorithm of the i.MX28 application processor.
For my intended data recovery purpose, I need to know how the actual hardware ECC algorithm of the i.MX28 works. In my specific case it is supposed to be BCH8 (Bose-Chaudhuri-Hocquenghem codes with error correction capability of 8 bits), but I'm missing crucial information like the correct BCH parameters, the correct bit or byte ordering of the processed data, maybe some further ECC processing not related to BCH, or possibly some other magic sauce.
For instance, using the BCH library GitHub - jkent/python-bchlib: BCH library C Python module or the BCH implementation found of the NXP imx-kobs tool found in the GitHub repository imx-kobs/bch.c at master · NXPmicro/imx-kobs · GitHub , I can create the same BCH8 ECCs for specific data, but these ECCs don't match the corresponding ECCs in my NAND dump with the same data.
I really hope that someone can help me actually using the error correcting codes used by the i.MX28 application processor for what they were intended for, which is correcting errors when using an unreliable storage medium like NAND flash memory.
Hi Bertha
I am afraid full info about hardware ECC algorithm of the i.MX28 is not publicly availabe
and for such kind of support one can use extended support with Professional Services
NXP Professional Services|NXP
Best regards
igor
Hello igorpadykov,
thank you for your quick reply.
Before I pay any money, or actually 499 USD, for two hour consultation with the NXP Professional Services, could you find out or even confirm if the Professional Support for Processors and Microcontrollers|NXP will be actually helpful and provide all the information I need to solve my problem?