Deciphering Exceptions

Several possible exception causes exist. If an exception is caught, an exception handler function can be called. Arm Cortex User Guide describes more about exception handler. There are ways to determine whether the hang up is due to the hard fault. One is to watch the Program Counter (PC) register which will indicate operation in the hard fault handler. The second method is to watch the special-purpose program status registers (xPSR).

../_images/exception_registers.png

Exception Registers