This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex-M3: Tips/Tricks to debug a Hard Fault?

Any hints, tips or tricks to debug a Cortex-M3: Hard Fault Exception?

It's an STM32, and I'm using the standard Keil STM32F10x.s: Startup file - which contains Dummy Exception Handlers (infinite loops) to "catch" the exception.

So, ahving arrived in the Hard Fault Exception Handler, what should I do next...?

Parents
  • I don't seem to be able to find it right now, but there is a very good article - also having been referenced from this forum at an earlier time - that describes this situation, i.e. how to look at the processor registers to figure out the memory address the processor came from when it hit the exception.

    You may possibly manage to find the link - directly on Google or the reference on this forum - or I may possibly have it linked in a browser at work.

    Another alternative is to fight through the ARM manuals for the description of the register contents after an exception.

Reply
  • I don't seem to be able to find it right now, but there is a very good article - also having been referenced from this forum at an earlier time - that describes this situation, i.e. how to look at the processor registers to figure out the memory address the processor came from when it hit the exception.

    You may possibly manage to find the link - directly on Google or the reference on this forum - or I may possibly have it linked in a browser at work.

    Another alternative is to fight through the ARM manuals for the description of the register contents after an exception.

Children