How to test about flash memory ECC?

Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to test about flash memory ECC?

Contributor II


I know that the way to test RAM ECC is by using the ECSM register in MPC5674F.

But, I don't know how to proceed with the test way for flash memory ECC.

Can I get sample codes?

Or, please let me know how to test about it.

I found the FLASH_x_UT0~2, but I can't correctly understand about the registers.

What I want to test is to make sure that the ECC interrupt handler is called when reading a data in flash memory.


0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi, I have written a document dealing ECC on MPC55xx/MPC56xx. Here is the link:

AN5200 - Error Correcting Codes Implemented on MPC55xx and MPC56xx 


However it does not mention 3 features (mentioned FLASH_x_UT0~2 registers) presented on certain devices that could be related to this topic as well: ‘array integrity check’, ‘ECC logic check’ and ‘Margin Read’


With using of ‘array integrity check’ user can compare stored checksum with checksum calculated above flash image during runtime. ‘ECC logic check’ tests the functionality of ECC logic whether it does or does not work, but it does not inject errors to any memory storage. ‘Margin Read’ is a feature allowing voltage thresholds changing (unbalance it towards logic ‘0’ or ‘1’) during Array Integrity check in order to detect possible flash degradation.

Back to AN5200 - Example 2 shows how to inject RAM ECC error with using of ECSM, it is even prepared for MPC5674F device.

Hope it helps.

0 Kudos