You copied the Doc URL to your clipboard.

Types of exceptions in the microcontroller profiles

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.

Table 14. Exception types in priority order
PositionExceptionPriorityDisableDescription
1Reset-3No 
2NMI-2NoNon-Maskable Interrupt (NMI)
3HardFault-1NoAll faults not covered by other exceptions
4MemManageconfigurableCan beMemory protection errors (ARMv7-M only)
5BusFaultconfigurableCan beOther memory faults (ARMv7-M only)
6UsageFaultconfigurableCan beInstruction execution faults other than memory faults (ARMv7-M only)
7-10Reserved-- 
11SVCallconfigurableCan beSynchronous SVC call caused by execution of SVC instruction
12Debug MonitorconfigurableCan beSynchronous debug event (ARMv7-M only)
13Reserved-- 
14PendSVconfigurableCan beAsynchronous SVC call
15SysTickconfigurableCan beSystem timer tick
16 and aboveExternal InterruptconfigurableCan beExternal 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.