Problrm debugging HardFault

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I am Working on a project for university. I need to recieve a UDP-broadcast which contains some information (integer, float) formatted as a string.
The sourcecode is written in C++ and does what it is suppoed to. But after some (approx. 100-7000) messages it stops working and generates a HardFault.

As I am trying to debug the problem, i found some information on overwritng the default error handler with a costum function which is able to get the programcounter before the error occured and some fault status register.

I created an error handler "static void HardFault_Handler(void)" in my main.cpp, but the function is not called on error occurence. Is there something else to make it active?

Is there a guideline for debugging HardFaults on XMC4500? Can the fault status registers be viewed with the debugger?

I am using the RelaxBoard and Dave3.

I hope someone can help me here.
Thanks in advance.
0 Likes
1 Reply
User8819
Level 4
Level 4
Hi,

Google for document with name "Developing a Generic Hard Fault handler for ARM.pdf". This help me a lot.

rum
0 Likes