Question
confusing hardfault in STM32F407
Posted on June 14, 2015 at 16:59
I get a hardfault in an STM32F407 I can't figure out.
My speculation is that the processor tries to execute code beyond the flash end. The debug window says the following: Thread[1](Suspended: Signal 'SIGINT' received. Description: Interrupt.) 5 irqGetStackFrame() irq.c:924 0x08028338 4 <signal handler called>() 0xfffffff9 3 <symbol is not available> 0x08563b54 2 movAvgFInit() util.c:346 0x08020e06 1 movAvgFInit() util.c:346 0x08020e06 The stack frame is: StackR3 0x10005cb4 StackR0 0x10005bcc StackR1 0x00000005 StackPC 0x08563b54 StackR12 0x00000000 StackR2 0x10005c0c StackLR 0x08020e07 StackPSR 0x21000200 stackframe 0x10006640 *stackframe 0x10005bcc The fault registers are: MMSR 00 BFSR 01 UFSR 0000 HFSR 40000000 DFSR 00000009 MMAR E000ED58 BFAR E000ED58 AFSR 00000000 In BFSR IBUSERR is set, as far as I can unerstand this probably flags the execution at 0x08563b54. In HFSR FORCED is set, looks like it's some problem with some exception handler. In DFSR HALTED and VCATCH are set, halt request in NVIC and vector catched event. The registers are: Core r0 0x10006640 r1 0x08563b54 r2 0x21000200 r3 0x10004788 r4 0x00000000 r5 0x00000000 r6 0x10005e2c r7 0x10005c0c r8 0x10005c64 r9 0x10005dec r10 0x10005bcc r11 0x10005dac r12 0x00000000 sp 0x10006640 lr 0xfffffff9 pc 0x08028338 xpsr 0x61000003 I have checked the interrupt vectors and they look ok.