Hi, currently I'm using MPC5748G in my project and encounter a problem of flash ECC error in a test of random power lose. The software uses one of 256K internal code flash (different partition with the code) for data storage to save some system parameters, and load them during system initialization. Flash ECC error occurs when power lose during the operation of program or erase sometimes. After reset, when reading this 256K flash address, it causes machine check exception with the ECC error indicating that address.
My question is how to detect the ECC error before reading that address? Or how to avoid this address to generate an exception?
Thanks very much.
Hi, Lukas, thanks for you answer very much.
In the document of "AN4868 EEPROM Emulation with Qorivva MPC55xx, MPC56xx, and MPC57xx Microcontrollers", it says:
these 'EEPROM Emulation' labeled blocks will not generate ECC error report even if the operation is unsuccessful. So I used the 32KB block which address is "0x00FB_8000-0x00FB_FFFF" to do the same random power lose experiment, but finally get the same result, in other words, it also will get machine check exception when CPU read it.
So why these 'EEPROM Emulation' labeled blocks also generate ECC errors ? I get confused.
I encountered the same problem when using MPC5604,and i am trying to find the solution. i come form china, we can add each other in WeChat. This is my ID 18946636923, add me.
Hi,
there's an erratum on MPC5748G:
https://www.nxp.com/docs/en/errata/MPC5748G_0N78S.pdf
Regards,
Lukas
Hi,
it's not possible to mask this event on CPU.
One workaround is to use DMA. There are two flags in error status register DMA_ES:
Read section "70.4.2 Fault reporting and handling" which describes the behavior in detail.
Regards,
Lukas