cancel
Showing results for 
Search instead for 
Did you mean: 

Hard fault when running code generated by STM32CUBE IDE for STM32F103C8Tx (debug using JTAG)

DVu v.1
Associate
 
2 REPLIES 2

You will probably want to implement a Hard Fault Handler to provide specific information about the instructions and registers at the fault.

Check you have a sufficiently large stack and that your memory use/interaction does not exceed the memory limits of the part.

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

There is a view called "Fault Analyzer": Window > Show View > Other... > Debug > Fault Analyzer. It will read out some fault status registers and show the exception stack frame from when the CPU crashed which can be handy to help you understand the issue better.

Worth highlighting is also that all exception/interrupts in the vector table which does not a matching defined ISR handler function, will be be linked to Default_Handler().