16. Nested vectored interrupt controller (NVIC)
16.1 NVIC main features
- • 108 maskable interrupt channels (not including the 16 Cortex-M33 with FPU interrupt lines)
- • 16 programmable priority levels (4 bits of interrupt priority used)
- • Low-latency exception and interrupt handling
- • Power management control
- • Implementation of system control registers
The NVIC and the processor core interface are closely coupled, enabling low-latency interrupt processing and efficient processing of late arriving interrupts.
The NVIC registers are banked across secure and nonsecure states. All interrupts including the core exceptions are managed by the NVIC. For more information about NVIC and its registers, refer to the programming manual for Cortex-M33 core (PM0264).
16.2 SysTick calibration value register
The Cortex-M33 with TrustZone mainline security extension embeds two SysTick timers. When TrustZone is activated, the following SysTick timers are available:
- • SysTick, secure instance
- • SysTick, nonsecure instance
When TrustZone is disabled, only one SysTick timer is available.
The SysTick timer calibration value (STCALIB) is 0x3E8. It gives a reference time base of 1 ms based on a SysTick clock frequency of 1 MHz. In order to match the 1 ms time base for an application running at a given frequency, the SysTick reload value must be programmed as follows in the SYST_RVR register:
- • When SysTick clock source is CPU clock HCLK reload value = \( (HCLK \times STCALIB) - 1 \)
- • When SysTick clock source is external clock (HCLK/8) reload value = \( ((HCLK/8) \times STCALIB) - 1 \)
The HCLK refers to the AHB frequency value in MHz.
Example: SysTick clock source is CPU clock HCLK of 100 MHz, to match a time base of 1 ms: SysTick reload value = \( (100 \times STCALIB) - 1 = 0x1869F \)
For more information about SysTick and its registers, refer to the programming manual for Cortex-M33 core (PM0264).
16.3 Interrupt and exception vectors
The grey rows in the table below indicate core exceptions.
Table 134. STM32U3 series vector table (1)
| IRQ number | Priority (2) | Acronym | Description | Address offset |
|---|---|---|---|---|
| - | -4 | Reset | Reset | 0x0000 0004 |
| -14 | -2 | NMI | Non maskable interrupt. The RCC clock security system (CSS) and flash ECC detection interrupts are linked to the NMI vector. | 0x0000 0008 |
| -13 | -3 or -1 | Secure HardFault | Secure hard fault | 0x0000 000C |
| -1 | HardFault | Hard fault | ||
| -12 | Settable | MemManage | Memory management | 0x0000 0010 |
| -11 | Settable | BusFault | Pre-fetch fault, memory access fault | 0x0000 0014 |
| -10 | Settable | UsageFault | Undefined instruction or illegal state | 0x0000 0018 |
| -9 | Settable | SecureFault | Secure fault | 0x0000 001C |
| - | - | - | Reserved | 0x0000 0020 - 0x0000 0028 |
| -5 | Settable | SVC | Supervisor call | 0x0000 002C |
| -4 | Settable | DebugMonitor | Debug monitor | 0x0000 0030 |
| - | - | - | Reserved | 0x0000 0034 |
| -2 | Settable | PendSV | Pendable request for system service | 0x0000 0038 |
| -1 | Settable | SysTick | System tick timer | 0x0000 003C |
| 0 | Settable | WWDG | Window watchdog interrupt | 0x0000 0040 |
| 1 | Settable | PVD_PVM | Programmable voltage detector/peripheral voltage monitor EXTI16/19/20/21/22 | 0x0000 0044 |
| 2 | Settable | RTC | RTC nonsecure global interrupts | 0x0000 0048 |
| 3 | Settable | RTC_S | RTC secure global interrupts | 0x0000 004C |
| 4 | Settable | TAMP | Tamper global interrupts | 0x0000 0050 |
| 5 | Settable | RAMCFG | RAM configuration global interrupt | 0x0000 0054 |
| 6 | Settable | FLASH | Flash memory nonsecure global interrupts | 0x0000 0058 |
| 7 | Settable | FLASH_S | Flash memory secure global interrupt | 0x0000 005C |
| 8 | Settable | GTZC | GTZC1 global interrupt | 0x0000 0060 |
| 9 | Settable | RCC | RCC nonsecure global interrupt | 0x0000 0064 |
| IRQ number | Priority (2) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 10 | Settable | RCC_S | RCC secure global interrupt | 0x0000 0068 |
| 11 | Settable | EXTI0 | EXTI line0 interrupt | 0x0000 006C |
| 12 | Settable | EXTI1 | EXTI line1 interrupt | 0x0000 0070 |
| 13 | Settable | EXTI2 | EXTI line2 interrupt | 0x0000 0074 |
| 14 | Settable | EXTI3 | EXTI line3 interrupt | 0x0000 0078 |
| 15 | Settable | EXTI4 | EXTI line4 interrupt | 0x0000 007C |
| 16 | Settable | EXTI5 | EXTI line5 interrupt | 0x0000 0080 |
| 17 | Settable | EXTI6 | EXTI line6 interrupt | 0x0000 0084 |
| 18 | Settable | EXTI7 | EXTI line7 interrupt | 0x0000 0088 |
| 19 | Settable | EXTI8 | EXTI line8 interrupt | 0x0000 008C |
| 20 | Settable | EXTI9 | EXTI line9 interrupt | 0x0000 0090 |
| 21 | Settable | EXTI10 | EXTI line10 interrupt | 0x0000 0094 |
| 22 | Settable | EXTI11 | EXTI line11 interrupt | 0x0000 0098 |
| 23 | Settable | EXTI12 | EXTI line12 interrupt | 0x0000 009C |
| 24 | Settable | EXTI13 | EXTI line13 interrupt | 0x0000 00A0 |
| 25 | Settable | EXTI14 | EXTI line14 interrupt | 0x0000 00A4 |
| 26 | Settable | EXTI15 | EXTI line15 interrupt | 0x0000 00A8 |
| 27 | Settable | IWDG | Independent watchdog interrupt | 0x0000 00AC |
| 28 | Settable | SAES | Secure AES | 0x0000 00B0 |
| 29 | Settable | GPDMA1_CH0 | GPDMA1 channel 0 global interrupt | 0x0000 00B4 |
| 30 | Settable | GPDMA1_CH1 | GPDMA1 channel 1 global interrupt | 0x0000 00B8 |
| 31 | Settable | GPDMA1_CH2 | GPDMA1 channel 2 global interrupt | 0x0000 00BC |
| 32 | Settable | GPDMA1_CH3 | GPDMA1 channel 3 global interrupt | 0x0000 00C0 |
| 33 | Settable | GPDMA1_CH4 | GPDMA1 channel 4 global interrupt | 0x0000 00C4 |
| 34 | Settable | GPDMA1_CH5 | GPDMA1 channel 5 global interrupt | 0x0000 00C8 |
| 35 | Settable | GPDMA1_CH6 | GPDMA1 channel 6 global interrupt | 0x0000 00CC |
| 36 | Settable | GPDMA1_CH7 | GPDMA1 channel 7 global interrupt | 0x0000 00D0 |
| 37 | Settable | ADC1 | ADC1 global interrupt | 0x0000 00D4 |
| 38 | Settable | DAC1 | DAC1 global interrupt | 0x0000 00D8 |
| IRQ number | Priority (2) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 39 | Settable | FDCAN1_IT0 | FDCAN1 interrupt 0 | 0x0000 00DC |
| 40 | Settable | FDCAN1_IT1 | FDCAN1 interrupt 1 | 0x0000 00E0 |
| 41 | Settable | TIM1_BRK TIM1_TERR TIM1_IERR | TIM1 break TIM1 transition error TIM1 index error | 0x0000 00E4 |
| 42 | Settable | TIM1_UP | TIM1 update | 0x0000 00E8 |
| 43 | Settable | TIM1_TRG_COM TIM1_DIR TIM1_IDX | TIM1 trigger and commutation TIM1 direction change interrupt TIM1 index | 0x0000 00EC |
| 44 | Settable | TIM1_CC | TIM1 capture compare interrupt | 0x0000 00F0 |
| 45 | Settable | TIM2 | TIM2 global interrupt | 0x0000 00F4 |
| 46 | Settable | TIM3 | TIM3 global interrupt | 0x0000 00F8 |
| 47 | Settable | TIM4 | TIM4 global interrupt | 0x0000 00FC |
| 48 | - | - | Reserved | 0x0000 0100 |
| 49 | Settable | TIM6 | TIM6 global interrupt | 0x0000 0104 |
| 50 | Settable | TIM7 | TIM7 global interrupt | 0x0000 0108 |
| 51 | Settable | TIM12 | TIM12 global interrupt | 0x0000 010C |
| 52 | - | - | Reserved | 0x0000 0110 |
| 53 | Settable | I3C1_EV | I3C1 event interrupt | 0x0000 0114 |
| 54 | Settable | I3C1_ER | I3C1 error interrupt | 0x0000 0118 |
| 55 | Settable | I2C1_EV | I2C1 event interrupt | 0x0000 011C |
| 56 | Settable | I2C_ER | I2C1 error interrupt | 0x0000 0120 |
| 57 | Settable | I2C2_EV | I2C2 event interrupt | 0x0000 0124 |
| 58 | Settable | I2C2_ER | I2C2 error interrupt | 0x0000 0128 |
| 59 | Settable | SPI1 | SPI1 global interrupt | 0x0000 012C |
| 60 | Settable | SPI2 | SPI2 global interrupt | 0x0000 0130 |
| 61 | Settable | USART1 | USART1 global interrupt | 0x0000 0134 |
| 62 | Settable | USART2 | USART2 global interrupt | 0x0000 0138 |
| 63 | Settable | USART3 | USART3 global interrupt | 0x0000 013C |
| 64 | Settable | UART4 | UART4 global interrupt | 0x0000 0140 |
| IRQ number | Priority (2) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 65 | Settable | UART5 | UART5 global interrupt | 0x0000 0144 |
| 66 | Settable | LPUART1 | LPUART1 global interrupt | 0x0000 0148 |
| 67 | Settable | LPTIM1 | LPTIM1 global interrupt | 0x0000 014C |
| 68 | Settable | LPTIM2 | LPTIM2 global interrupt | 0x0000 0150 |
| 69 | Settable | TIM15 | TIM15 global interrupt | 0x0000 0154 |
| 70 | Settable | TIM16 | TIM16 global interrupt | 0x0000 0158 |
| 71 | Settable | TIM17 | TIM17 global interrupt | 0x0000 015C |
| 72 | Settable | COMP | COMP1/COMP2 | 0x0000 0160 |
| 73 | Settable | USB | USB global interrupt | 0x0000 0164 |
| 74 | Settable | CRS | Clock recovery system global interrupt | 0x0000 0168 |
| 75 | - | - | Reserved | 0x0000 016C |
| 76 | Settable | OCTOSPI1 | OCTOSPI1 global interrupt | 0x0000 0170 |
| 77 | Settable | HSP1 | HSP1 global interrupt | 0x0000 0174 |
| 78 | Settable | SDMMC1 | SDMMC1 global interrupt | 0x0000 0178 |
| 79 | - | - | Reserved | 0x0000 017C |
| 80 | Settable | GPDMA1_CH8 | GPDMA1 channel 8 interrupt | 0x0000 0180 |
| 81 | Settable | GPDMA1_CH9 | GPDMA1 channel 9 interrupt | 0x0000 0184 |
| 82 | Settable | GPDMA1_CH10 | GPDMA1 channel 10 interrupt | 0x0000 0188 |
| 83 | Settable | GPDMA1_CH11 | GPDMA1 channel 11 interrupt | 0x0000 018C |
| 84 | - | - | Reserved | 0x0000 0190 |
| 85 | - | - | Reserved | 0x0000 0194 |
| 86 | - | - | Reserved | 0x0000 0198 |
| 87 | - | - | Reserved | 0x0000 019C |
| 88 | Settable | I2C3_EV | I2C3 event interrupt | 0x0000 01A0 |
| 89 | Settable | I2C3_ER | I2C3 error interrupt | 0x0000 01A4 |
| 90 | Settable | SAI1 | SAI1 global interrupt | 0x0000 01A8 |
| 91 | - | - | Reserved | 0x0000 01AC |
| 92 | Settable | TSC | TSC global interrupt | 0x0000 01B0 |
| 93 | Settable | AES | AES global interrupt | 0x0000 01B4 |
| IRQ number | Priority (2) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 94 | Settable | RNG | RNG global interrupt | 0x0000 01B8 |
| 95 | Settable | FPU | Floating point interrupt | 0x0000 01BC |
| 96 | Settable | HASH | HASH interrupt | 0x0000 01C0 |
| 97 | Settable | PKA | PKA global interrupt | 0x0000 01C4 |
| 98 | Settable | LPTIM3 | LPTIM3 global interrupt | 0x0000 01C8 |
| 99 | Settable | SPI3 | SPI3 global interrupt | 0x0000 01CC |
| 100 | Settable | I3C2_EV | I3C2 event interrupt | 0x0000 01D0 |
| 101 | Settable | I3C2_ER | I3C2 error interrupt | 0x0000 01D4 |
| 102 | Settable | TIM8_BRK TIM8_TERR TIM8_IERR | TIM8 break TIM8 transition error TIM8 index error | 0x0000 01D8 |
| 103 | Settable | TIM8_UP | TIM8 update | 0x0000 01DC |
| 104 | Settable | TIM8_TRG_COM TIM8_DIR TIM8_IDX | TIM8 trigger and commutation TIM8 direction change interrupt TIM8 index | 0x0000 01E0 |
| 105 | Settable | TIM8_CC | TIM8 capture compare interrupt | 0x0000 01E4 |
| 106 | - | - | Reserved | 0x0000 01E8 |
| 107 | Settable | ICACHE | Instruction cache global interrupt | 0x0000 01EC |
| 108 | - | - | Reserved | 0x0000 01F0 |
| 109 | Settable | LCD | LCD global interrupt | 0x0000 01F4 |
| 110 | Settable | LPTIM4 | LPTIM4 global interrupt | 0x0000 01EC |
| 111 | - | - | Reserved | 0x0000 01FC |
| 112 | Settable | ADF1 | ADF1 interrupt | 0x0000 0200 |
| 113 | Settable | ADC2 | ADC2 global interrupt | 0x0000 0204 |
| 114 | Settable | FDCAN2_IT0 | FDCAN2 interrupt 0 | 0x0000 0208 |
| 115 | Settable | FDCAN2_IT1 | FDCAN2 interrupt 1 | 0x0000 020C |
| 116 | Settable | I2C4_EV | I2C4 event interrupt | 0x0000 0210 |
| 117 | Settable | I2C4_ER | I2C4 error interrupt | 0x0000 0214 |
| 118 | - | - | Reserved | 0x0000 0218 |
| 119 | Settable | SPI4 | SPI4 global interrupt | 0x0000 021C |
| IRQ number | Priority (2) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 120 | - | - | Reserved | 0x0000 0220 |
| 121 | - | - | Reserved | 0x0000 0224 |
| 122 | - | - | Reserved | 0x0000 0228 |
| 123 | Settable | PWR | PWR nonsecure interrupt | 0x0000 022C |
| 124 | Settable | PWR_S | PWR secure interrupt | 0x0000 0230 |
- 1. Some interrupt lines are only available on some STM32U3 series devices. Refer to the device datasheet for availability of associated peripheral. If not present, consider this interrupt line as reserved.
- 2. If multiple pending interrupts have the same programmed priority level, the pending interrupt with the lowest IRQ number takes precedence. For example, if both interrupt[n] and interrupt[n+1] are pending and have the same priority, then interrupt[n] is processed before interrupt[n+1]. For further information, refer to the Arm Cortex-M33 technical documentation.