cancel
Showing results for 
Search instead for 
Did you mean: 

hardfault handler

pujitha
Associate

I was using stm32 cube mx to configure a pin to toggle the led so code generated using cube mx and then i just wrote the required function to toggle the led but once the code is compiled it shows zero errrors. when i debugged it and started running the code it goes to the hardfault handler where using the fault analyzer i came to know its a bus fault error and the kind of error is imprecise error. what am i supposed to avoid this errror

 

1 REPLY 1

Imprecise suggest it is a buffered/pipeline write.

You will need to review the MCU registers and the code disassembly immediately prior to the fault.

Hard to diagnose remotely with no detail, or code that fails. Check pointers and structures are properly initialized.

The compiler can only flag syntax errors, not flaws in the logic or implementation. 

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