cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411 HardFault

bean li
Associate
Posted on August 16, 2017 at 04:00

There is much information for the hard fault:

SCB->HFSR: 40000000

SCB->CFSR: 400

MSP: 2000fb58 PSP: 200193b8  LR: fffffff1

r0: 0

r1: 2000dcd0

r2: 8000529

r3: 1

r12: 0

LR: 0

PC: 8030ba0

PSR: 2100000f

what method can solve ?

it's imprecise data bus error, i don't know how to do .

can you help me ? thanks

#stm32f4 #hardfault
3 REPLIES 3
Posted on August 16, 2017 at 14:53

Like all hard faults, start by looking at the faulting instructions.... Disassemble the one pointed too, and those immediately prior.

Imprecise likely means the fault is from a deferred write (ie write buffers), and the STR just before the current instruction caused the fault. Look at what address it is attempting to write to.

Dig through the stack.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 17, 2017 at 08:09

I printed some values that in the stack. but i don't know why the LR is 0.

i can't use J-link tools ,just can print some information through UART .

Posted on August 17, 2017 at 10:27

Then generate a listing file and review the offending code from that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..