Hello everybody, today I discovered a puzzling Hard Fault problem on the NXP LPC54608 MCU.
At present, during our testing process, we have found that out of 18000 MCU machines, 500 MCU machines have experienced hard faults.
Surprisingly, each MCU machine has a different PC address where the error occurred, but the same MCU machine that has experienced hard faults will repeatedly experience hard faults at the same PC address.
In fact, the current MCU machine with hard fault is one of 500 MCU machines that have experienced hard fault. The following is a description of the problem with this MCU machine.
"0xf8df0a48"(correct code) is the content on program code segment 0x00004120 (on-chip-FLASH's address).
When I debug and execute code (running code on on-chip-flash), everything seems to be running smoothly from the beginning.
However, at the moment Function A returns, the content of program code segment 0x00004120 has been changed from "0xf8df0a48" to "0xf8df0848". (I don't know why this is happening, I would like to ask for your opinion)
Therefore, a hard fault interrupt occurred while executing code "0xf8df0848" (which should have executed “0xf8df0a48"), and after entering the hard fault interrupt, the content of program code segment 0x00004120 changed from the wrong "0xf8df0848" to the correct "0xf8df0a48" again, which felt too incredible!
Hello @mega32
It seems that we're experiencing exactly the same issue with our products equipped with the same MCU. We have very similar defect rates.
Have you found a solution to this issue? Have you implemented any safeguards to prevent falling into this situation again?
Thank you in advance for your help and have a good day!
Hi @Alice_Yang
Thank you for your answer,
I tried using simple demo code, but I can't reproduce this problem.
I am using IAR's non download debugging to reproduce this problem, and I think it should not be related to the IDE.
BR
Mega32
Hello @Alice_Yang
We have checked the code many times and there are no issues.
Meanwhile, the optimization level is set to 'None'.
Moreover, this Hard Fault problem is only an occasional occurrence (500/18000), and it should not be caused by the reason you mentioned.
BR
mega32