During the firmware running, there will be a HardFault_Handler error occasionally.
Is there any way to locate the error source?
Is there any good way to catch the hardware exception? Thanks!
During the firmware running, there will be a HardFault_Handler error occasionally.
Is there any way to locate the error source?
Is there any good way to catch the hardware exception? Thanks!
Based on MDK5.25, nRF5_SDK_15.3.0_59ac345, and open DEBUG macro, and -O0
Based on MDK5.25, nRF5_SDK_15.3.0_59ac345, and open DEBUG macro, and -O0
Hi, to quick summarize:
You have to find the stack pointer (SP) value at r13, as you can see that that is the location of the stack pointer in Cortex M4:
You then have to add 0x18 to the stack pointer value, and this will give you the program counter (PC) value that cause the error.
Best regards,
Andreas