Dears,
now we encounter a ECC issue, the cystal can not work,and a reset signal shown up every 10ms, after reading the S19 file ,we found BT not earase the previous program, so we suspected the MCU has the ECC fault, and then trigger the interrupt. now we have below questions, please help to answer it:
1. if there is method to inject an ECC fault , by this we can make sure is the issue is caused by the ECC faulty;
2 if it is indeed caused by the ECC issue , then which registers we can read from to confirm it?
3. now we can not attach the MCU through debugger(emulator), cause it is always reset every 10 ms, how can we reolve this and to reattach the MCU?
Hi Fidel,
First of all, we provide this application note which describes ECC handling in detail:
https://www.nxp.com/docs/en/application-note/AN5200.pdf
https://www.nxp.com/docs/en/application-note-software/AN5200SW.zip
In short, ECC can occur when erase/program operation is terminated by unexpected reset; when you over-program non-erased double word; when too many erase cycles were performed on the flash…
Yes, the ECC can be injected also by software by overprogramming. This is described in the application note.
When core accesses corrupted flash or RAM (talking about double bit ECC error), an exception is triggered. See Table 4 in the AN5200. Core registers then show more details about the root cause (details also in AN5200). In addition, EER bit in CFLASH_MCR or in DFLASH_MCR is set.
If the problem is caused by ECC error, a debugger should be able to establish the connection. If the device is reset anyway each 10ms, the debugger is probably configured to run to main function after reset. The solution is to configure the debugger to not execute the code after reset. Then you should be able to check the content of memory or to step the code to see what is happening exactly in startup files.
For example, if you use Pemicro, go to Debug Configuration and then to Starup tab a uncheck Run on reset which is enabled by default:
Regards,
Lukas
Hi Lukas,
first thanks a lot for your support, but now we are using CodeWarrior, instead of S32DS , so could you please help to tell me how should we resolve the issue with CW? and we also read the AN and the example , but seems still cannot work. is there anything we need to pay attention to? and we found there is no dedicated example code for 5604B, do you have that? thanks a lot~
Hi,
there's similar configuration also in the CodeWarrior:
And some examples for CodeWarrior can be found here:
https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/MPC5-software-example-list/ta-p/1102445
Just search for "ECC".
Regards,
Lukas
May I ask what version of software is used in the example? The software we use now does not have this interface
The screenshot comes from S32 Design Studio 2.1. Which IDE do you have?
Could you please explain the injection procedure of ECC fault with codewarrior10.6 as an example