2015-06-03 03:35 PM
Can somebody explain me how to find cause of hardfault? I try to use solution from
http://blog.frankvh.com/2011/12/07/cortex-m3-m4-hard-fault-handler/
but buffer is empty.Here are core registers dump (from keil UI):SP = 0x20001178LR = 0xFFFFFFF1PC = 0x08006604xPSR = 0x61000003MSP = 0x20001178PSP = 0x00000000Is it possible to find instruction that cause hard fault? #stm32 #hardfault #m42015-06-03 03:54 PM
If I were doing it manually, I'd look at the code pointed at by the PC (Program Counter)
I'd dump the 32-bit words are the top of the stack (SP), and look for addresses in the 0x08000000 FLASH memory.2015-06-03 04:07 PM
I don't understand what you meat writing ''
I'd dump the 32-bit words are the top of the stack (SP), and look for addresses in the 0x08000000 FLASH memory.'' Could you explain it clearly for me?
2015-06-04 04:47 AM
SP is the stack pointer and the stack grows downwards, so dump the memory above SP (look at it in the debugger) and investigate. The old program counter is stored at [SP + 0x18].