cancel
Showing results for 
Search instead for 
Did you mean: 

HARD FAULT HANDLER

Shrini17
Associate

Hi,playing around a program found hard fault handler on debugging Can anyone help to proceed that

Shrini17_0-1727962103489.pngShrini17_1-1727962128156.png

 

2 REPLIES 2

Look at what's actually faulting.

Most likely bad address or point, or misalignment. The CM0(+) do not tolerate misaligned 32-bit access.

Have a handler that outputs actionable detail, this is NOT done with a while(1) loop.

You can inspect the registers and stack in the debugger, but it's not nearly as helpful as printing something out, especially in the field or end-users, who aren't going to have access.

Instrument your code so you've got some first idea as to where it's going, what it's doing, and where it is failing.

 

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