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).
IAR memory_correct
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)
IAR disassembly
Function A
IAR memory_error
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!