Skip to main content
Visitor II
October 3, 2024
Question

HARD FAULT HANDLER

  • October 3, 2024
  • 2 replies
  • 1361 views

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

Shrini17_0-1727962103489.pngShrini17_1-1727962128156.png

 

This topic has been closed for replies.

2 replies

Andrew Neil
Super User
October 3, 2024
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Tesla DeLorean
Guru
October 3, 2024

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..