Hi,
I am using S32K118 MCU for my project and need to enable ECC on flash . I need to know how to recover the corrupted flash or know the address of corrupted blocks addresses to recover the corruption
It is needed to remove source of error what's in case flash memory mean to erase/program particular flash block containing the error. Reading of other block should not invoke ECC fault. I could point out following document showing how to manage Cortex-M4 core fault in general, maybe it could be useful for you: https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447
I try to perform reset but it doesn't work, The ECC interrupt is come after any read operation even though read the not corrupted block
so my problem now that after any corruption to flash (program or data) I can't recover my SW the only solution to erase all flash and re-flash it again by debugger so there are way to do it automatically with SW code?
Pay attention to:
https://www.nxp.com/docs/en/application-note/AN12522.pdf
How to recover from flash multibit ECC error is application specific.
However faulty address you may find out according BFAR register when Bus Fault happens (needs to be enabled).
Hi davidtosenovjan ,
I use S32K118 which use ARM cortex M0+ that not support Bus Fault , so is there other way to know the address of corrupted data or any other way to recovery?
There is no other options because an attempt to execute/read data affected by multibit ECC fault must be terminated by error response.