2010-09-29 07:50 AM
ARM Cortex-M3 STM32F103 Clearing FSR False Status Bits
2011-05-17 05:09 AM
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).2011-05-17 05:09 AM
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.