Chip Failure Analysis Series — A Brief Discussion on MICRON Memory ECC Functionality

#Automotive
#Automotive - others
Date:2026-11-06

Introduction:
Hello everyone, I'm Efreet. In this article, I want to introduce the ECC feature of memory, as well as its practical applications in engineering. In real-world engineering scenarios, you may sometimes encounter issues like this: the board occasionally fails to boot properly, the system logs frequently show 'Bad Block' messages, and when you try to pinpoint the cause, you discover that the problem is related to the board's Flash chip. Initially, you might suspect that the Nand Flash chip itself is faulty, but even after replacing the chip, the issue persists. Eventually, you realize—the real problem is that the ECC (Error Correction Code) feature wasn't enabled!

 

 

1. What is ECC?
ECC (Error Correction Code) stands for Error Correction Code, and it is used to check and correct the integrity of data stored in memory. ECC is designed based on the principle of parity checking. In non-volatile memory types like NAND Flash, due to physical characteristics such as charge leakage, write/erase cycle limitations, and process variations, data bits may flip over time (bit flip), causing discrepancies between the data read and the original data written.

The primary goal of ECC is to not only detect errors when these 'soft errors' occur, but also to automatically correct them within a certain range, thereby ensuring system stability and data reliability.

As a leading global manufacturer of storage chips, Micron's Nand Flash products—including SLC, MLC, and TLC types—natively support ECC functionality. Typically, these products require collaboration with a controller, such as a NAND controller integrated within an SoC, to operate effectively.

 

2. The Main Principles of ECC
The implementation of ECC is based on mathematical coding theory. Common algorithms include Hamming Code, BCH (Bose-Chaudhuri-Hocquenghem) code, and more advanced LDPC (Low-Density Parity-Check) codes.

Taking Micron's mainstream NAND Flash as an example, it is generally recommended to use the BCH algorithm for the following reasons:

Strong error correction capability: BCH can support the correction of multiple bit errors (such as 4-bit, 8-bit, or even 24-bit errors), making it suitable for high-density but less reliable types of Flash memory like MLC/TLC.

Mature hardware implementation: Most embedded SoCs, such as those from TI, NXP, Qualcomm, Rockchip, and others, have NAND controllers with built-in BCH hardware acceleration modules.

Controllable overhead: Taking Micron NAND as an example, there are 8 bits of ECC check code for every 544 bytes of data.

Simply put, when writing data, the controller generates an ECC checksum based on the original data and writes both the data and the ECC to the Flash. During reading, the controller recalculates the ECC and compares it with the stored checksum. If there are differences but they are within the correctable range, the system will automatically repair the data and return the correct result. If the errors exceed the correction capability, an Uncorrectable Error will be reported, and the system may mark the affected block as a 'bad block.'

 

3. Application of ECC in Engineering Practice
In real-world projects, ECC configuration and activation are often overlooked, which can lead to serious misjudgments. Here are a few typical scenarios:

Scenario 1: The system frequently reports 'bad blocks,' but the Flash has no physical damage.

Some customers have reported that the equipment fails to start after operating for a period of time in high-temperature environments. The logs show a large number of bad blocks. Initially, we suspected it was a flash quality issue, but after replacing the chips with others from the same batch, the problem persisted.

After investigation, it was found that the SoC's NAND controller did not have the ECC function enabled, which caused minor bit flips to be mistakenly identified as unrecoverable errors and subsequently marked as bad blocks. Once ECC was enabled, system stability improved significantly.

Scenario 2: Bootloader fails to start from NAND

Certain SoCs, such as the AM335x and RK3399, require specific ECC modes (like 1-bit Hamming or 8-bit BCH) to be used during the boot phase. If the ECC settings used when flashing the image do not match those expected by the BootROM, verification will fail and the kernel cannot be loaded.

Solution: Please make sure to specify the correct ECC mode when compiling U-Boot, and ensure it is consistent with both the Flash chip's datasheet and the SoC manual.

Scenario 3: Data silent corruption caused by ECC mode mismatch

Even if the system can read and write normally, using 4-bit ECC during writing but mistakenly using 1-bit ECC during reading may result in some errors going uncorrected, leading to silent data corruption—the most dangerous scenario, because the system is completely unaware of it.

 

✅ Recommended Best Practices:

At the beginning of the project, be sure to review the Micron Flash datasheet and the ONFI specification to confirm the recommended ECC strength (for example: '8-bit ECC required for every 512 bytes').

Explicitly set the ECC mode in the SoC driver or U-Boot, rather than relying on default values.

Include ECC stress testing in mass production tests (such as high-temperature aging combined with read/write cycles) to verify the limits of error correction capability.

4. Conclusion
Although ECC is often seen as a 'behind-the-scenes hero,' its role is absolutely critical in high-reliability systems such as industrial control, automotive electronics, and medical devices. Many times, what we think of as 'Flash failure' is actually just due to ECC not being enabled or being incorrectly configured.

As an engineer, when dealing with issues related to Nand Flash, remember to ask one more question: "Is ECC enabled? Is it properly paired?"—this could very well be the key to solving the problem.

I hope this article helps you avoid unnecessary detours on your journey of chip failure analysis. If you have relevant experience or questions, feel free to share them in the comments section!

I'm Efreet. See you next time!
 

★All content is provided by individuals and is unrelated to the platform. For any legal or infringement issues, please contact the Tech Highlights Exclusive Email