The following table shows the different types of exceptions recognized by the microcontroller profiles. When an exception occurs simultaneously, they are handled in a fixed order of priority. Each exception is handled in turn before returning to the original application.
|2||NMI||-2||No||Non-Maskable Interrupt (NMI)|
|3||HardFault||-1||No||All faults not covered by other exceptions|
|4||MemManage||configurable||Can be||Memory protection errors (ARMv7-M only)|
|5||BusFault||configurable||Can be||Other memory faults (ARMv7-M only)|
|6||UsageFault||configurable||Can be||Instruction execution faults other than memory faults (ARMv7-M only)|
|11||SVCall||configurable||Can be||Synchronous SVC call caused by execution of |
|12||Debug Monitor||configurable||Can be||Synchronous debug event (ARMv7-M only)|
|14||PendSV||configurable||Can be||Asynchronous SVC call|
|15||SysTick||configurable||Can be||System timer tick|
|16 and above||External Interrupt||configurable||Can be||External interrupt|
Exceptions with a lower priority number have a higher priority status. For example, if a processor is in Handler mode, an exception is taken if it has a lower priority number than the exception currently being handled. Any exception with the same priority number or higher is pended.
When an exception handler terminates:
If there are no exceptions pending, the processor returns to Thread mode, and execution returns to the application program.
If there are any exceptions pending, execution passes to the handler of the pending exception with the lowest priority number. If there are two pending exceptions with the same lowest priority number, the exception with the lowest exception number is handled first.