Hello Dialog,
我们的一些德vices are occasionally suffering hardfaults. From diagnostic data collected from the device, I understand that I can determine the address of faulting instructions via the saved PC. Is this true, or is the PC at the time of the fault actually the instruction AFTER the faulting instruction? The reason I'm asking is that the PC points to a MOV instruction, which follows a LDRB instruction. LDRB seems much more likely to cause a hardfault.
Thanks!
Device:
Hi JamesHiebert,
The PC at the time of the hardfault contains the address of the faulting instruction. For example if the last assembly instruction of the faulting C code is at 0x20005924, the PC at the time of the haurdfault will point at the same address. So, your query that the PC at the time of the fault actually the instruction AFTER the faulting instruction, is not correct.
Thanks, PM_Dialog