cancel
Showing results for 
Search instead for 
Did you mean: 

Exception handler code for STM32F0

ECost
Associate II

I did a search in this forum and in the Internet but did not find anything specific. I have found some references and online articles but I would like to avoid reinventing the wheel or at least reinventing it from scratch.

I am thinking of a handler (C or C++ or even Assembly) that could retrieve information such as exception number, stack pointer value and other relevant flags and registers and save this info to the RAM.

I could use the saved data to debug exceptions and further to generate logs (should the exception occurr in the deployed system) that would help me to debug in the field issues.

3 REPLIES 3

Posted examples of Hard Fault Handlers before.

Where you save the data long term is going to be board/implementation dependent, probably going to have to own that, and recovery of the compromised system.

The sort of data you can pull from the core will be in the ARM Technical Reference Manuals

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

Hello, Clive, thank you for chiming in.

Would you have a link for this code? I could not locate them (maybe I have used the wrong search words).

As for the second part of your answer, yes, that is the plan.

ECost
Associate II

No link?