cancel
Showing results for 
Search instead for 
Did you mean: 

ARM Cortex-M3 STM32F103 Clearing FSR False Status Bits

kzawada
Associate II
Posted on September 29, 2010 at 16:50

ARM Cortex-M3 STM32F103 Clearing FSR False Status Bits

2 REPLIES 2
Posted on May 17, 2011 at 14:09

For which faulting condition? You'd have to decode the registers to determine the actual cause, and then determine if it is something you can resolve or not. Other than things like divide by zero, most are going to be pretty much fatal.

This document seems to have some good material

http://www.keil.com/appnotes/files/apnt209.pdf

See also

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337i/BABCIIIA.html

Mostly you'll see faults if the PC or SP touch memory they should not, the PC becomes aligned (ie ARM not THUMB). Or you otherwise touch memory via some other register based access that is out of bounds. The code you posted is similar to some diagnostic code I've used to track down faulting instructions. Before calling the C code, you have to make a determination as to where the faulting data is stacked (Main or Process Stack).

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
kzawada
Associate II
Posted on May 17, 2011 at 14:09

Thank you clive1.  This is very helpful.

There is also a book titled: ''The Definitive Guide to the ARM Cortex-M3, Second Edition'', by Joseph Yiu that explains this very well in Appendix E: Cortex-M3 Troubleshooting Guide.