The exception types are:
- Reset: Reset is invoked on power up or a warm reset. The exception model treats reset as a special form of exception. When reset is asserted, the operation of the processor stops, potentially at any point in an instruction. When reset is deasserted, execution restarts from the address provided by the reset entry in the vector table. Execution restarts in Thread mode.
- NMI: A Non-maskable Interrupt (NMI) can be signaled by a peripheral or triggered by software. This is the highest priority exception other than reset. It is permanently enabled and has a fixed priority of –2. NMIs cannot be:
- masked or prevented from activation by any other exception.
- preempted by any exception other than Reset.
- HardFault: A HardFault is an exception that occurs because of an error during normal or exception processing. HardFaults have a fixed priority of –1, meaning they have higher priority than any exception with configurable priority.
- SVCall: A supervisor call (SVC) is an exception that is triggered by the SVC instruction. In an OS environment, applications can use SVC instructions to access OS kernel functions and device drivers.
- PendSV: Pendable Service (PendSV) is an interrupt-driven request for system-level service. In an OS environment, use PendSV for context switching when no other exception is active.
- SysTick: a SysTick exception is an exception the system timer generates when it reaches zero. Software can also generate a SysTick exception. In an OS environment, the device can use this exception as system tick.
- Interrupt (IRQ): An interrupt, or IRQ, is an exception signalled by a peripheral, or generated by a software request. All interrupts are asynchronous to instruction execution. In the system, peripherals use interrupts to communicate with the processor.
Table 4-1 Properties of the different exception types| Exception Number | IRQ Number | Exception Type | Priority | Vector Address | Activation |
|---|
| 1 | - | Reset | –3, the highest | 0x00000004 | Asynchronous |
| 2 | –14 | NMI | –2 | 0x00000008 | Asynchronous |
| 3 | –13 | HardFault | –1 | 0x0000000C | Synchronous |
| 4-10 | – | Reserved | – | – | - |
| 11 | -5 | SVCall | Configurable | 0x0000002C | Synchronous |
| 12-13 | – | Reserved | – | – | - |
| 14 | –2 | PendSV | Configurable | 0x00000038 | Asynchronous |
| 15 | –1 | SysTick | Configurable | 0x0000003C | Asynchronous |
| 16 and above | 0 and above | IRQ | Configurable | 0x00000040 and above (increasing in steps of 4) | Asynchronous |
Note: To simplify the software layer, the CMSIS only uses IRQ numbers and therefore uses negative values for exceptions other than interrupts.
For an asynchronous exception, other than reset, the processor can continue executing instructions between when the exception is triggered and when the processor enters the exception handler.
Privileged software can disable the exceptions that have configurable priority.