15. Nested vectored interrupt controller (NVIC)
15.1 NVIC main features
- • 98 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 manages all interrupts including the core exceptions.
15.2 SysTick calibration value register
The Cortex-M33 embeds one SysTick timer. 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. 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 the SysTick clock source is CPU clock HCLK
the reload value = (HCLK × STCALIB)-1 - • When the SysTick clock source is an external clock (HCLK/8)
the reload value = ((HCLK/8) × STCALIB)-1
The HCLK refers to the AHB frequency value in MHz.
Example: The SysTick clock source is a CPU clock HCLK of 100 MHz, to match a time base of 1 ms:
15.3 Interrupt and exception vectors
The gray rows in the table below describe the vectors without specific position.
For the actual availability of some peripherals, check the datasheet or Table 3: Memory map and peripheral register boundary addresses. If not present, consider them as reserved.
Table 100. STM32C5 vector table
| IRQ number | Priority(1) | Acronym | Description | Address offset |
|---|---|---|---|---|
| -15 | -4 | Reset | Reset | 0x0000 0004 |
| -14 | -2 | NMI | Non maskable interrupt. The RCC clock security system (CSS) is linked to the NMI vector. | 0x0000 0008 |
| -13 | -1 | HardFault | Hard fault. All classes of fault | 0x0000 000C |
| -12 | Settable | MemManage | Memory management | 0x0000 0010 |
Table 100. STM32C5 vector table (continued)
| IRQ number | Priority(1) | Acronym | Description | Address offset |
|---|---|---|---|---|
| -11 | Settable | BusFault | Pre-fetch fault, memory access fault | 0x0000 0014 |
| -10 | Settable | UsageFault | Undefined instruction or illegal state | 0x0000 0018 |
| - | - | - | Reserved | 0x0000 001C |
| - | - | - | Reserved | 0x0000 0020 |
| - | - | - | Reserved | 0x0000 0024 |
| - | - | - | Reserved | 0x0000 0028 |
| -5 | Settable | SVC | System service call via SWI instruction | 0x0000 002C |
| -4 | Settable | Debug Monitor | 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 | Power voltage monitor | 0x0000 0044 |
| 2 | Settable | RTC | RTC global interrupts | 0x0000 0048 |
| 3 | Settable | TAMP | Tamper global interrupts | 0x0000 004C |
| 4 | Settable | RAMCFG | RAM configuration global interrupt | 0x0000 0050 |
| 5 | Settable | FLASH | Flash global interrupt | 0x0000 0054 |
| 6 | Settable | RCC | RCC global interrupt | 0x0000 0058 |
| 7 | Settable | EXTI0 | EXTI Line0 interrupt | 0x0000 005C |
| 8 | Settable | EXTI1 | EXTI Line1 interrupt | 0x0000 0060 |
| 9 | Settable | EXTI2 | EXTI Line2 interrupt | 0x0000 0064 |
| 10 | Settable | EXTI3 | EXTI Line3 interrupt | 0x0000 0068 |
| 11 | Settable | EXTI4 | EXTI Line4 interrupt | 0x0000 006C |
| 12 | Settable | EXTI5 | EXTI Line5 interrupt | 0x0000 0070 |
| 13 | Settable | EXTI6 | EXTI Line6 interrupt | 0x0000 0074 |
| 14 | Settable | EXTI7 | EXTI Line7 interrupt | 0x0000 0078 |
| 15 | Settable | EXTI8 | EXTI Line8 interrupt | 0x0000 007C |
| 16 | Settable | EXTI9 | EXTI Line9 interrupt | 0x0000 0080 |
| 17 | Settable | EXTI10 | EXTI Line10 interrupt | 0x0000 0084 |
| 18 | Settable | EXTI11 | EXTI Line11 interrupt | 0x0000 0088 |
| 19 | Settable | EXTI12 | EXTI Line12 interrupt | 0x0000 008C |
| 20 | Settable | EXTI13 | EXTI Line13 interrupt | 0x0000 0090 |
| 21 | Settable | EXTI14 | EXTI Line14 interrupt | 0x0000 0094 |
| 22 | Settable | EXTI15 | EXTI Line15 interrupt | 0x0000 0098 |
Table 100. STM32C5 vector table (continued)
| IRQ number | Priority(1) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 23 | Settable | LPDMA1_CH0 | LPDMA1 channel0 global interrupt | 0x0000 009C |
| 24 | Settable | LPDMA1_CH1 | LPDMA1 channel1 global interrupt | 0x0000 00A0 |
| 25 | Settable | LPDMA1_CH2 | LPDMA1 channel2 global interrupt | 0x0000 00A4 |
| 26 | Settable | LPDMA1_CH3 | LPDMA1 channel3 global interrupt | 0x0000 00A8 |
| 27 | Settable | LPDMA1_CH4 | LPDMA1 channel4 global interrupt | 0x0000 00AC |
| 28 | Settable | LPDMA1_CH5 | LPDMA1 channel5 global interrupt | 0x0000 00B0 |
| 29 | Settable | LPDMA1_CH6 | LPDMA1 channel6 global interrupt | 0x0000 00B4 |
| 30 | Settable | LPDMA1_CH7 | LPDMA1 channel7 global interrupt | 0x0000 00B8 |
| 31 | Settable | IWDG | Independent watchdog interrupt | 0x0000 00BC |
| 32 | Settable | ADC1 | ADC1 global interrupt | 0x0000 00C0 |
| 33 | Settable | ADC2 | ADC2 global interrupt | 0x0000 00C4 |
| 34 | Settable | FDCAN1_IT0 | FDCAN1 Interrupt 0 | 0x0000 00C8 |
| 35 | Settable | FDCAN1_IT1 | FDCAN1 Interrupt 1 | 0x0000 00CC |
| 36 | Settable | TIM1_BRK TIM1_TERR TIM1_IERR | TIM1 Break/TIM1 transition error/TIM1 Index error | 0x0000 00D0 |
| 37 | Settable | TIM1_UP | TIM1 update | 0x0000 00D4 |
| 38 | Settable | TIM1_TRG_COM TIM1_DIR TIM1_IDX | TIM1 trigger and commutation/TIM1 direction change interrupt/TIM1 Index | 0x0000 00D8 |
| 39 | Settable | TIM1_CC | TIM1 capture compare interrupt | 0x0000 00DC |
| 40 | Settable | TIM2 | TIM2 global interrupt | 0x0000 00E0 |
| 41 | Settable | TIM5 | TIM5 global interrupt | 0x0000 00E4 |
| 42 | Settable | TIM6 | TIM6 global interrupt | 0x0000 00E8 |
| 43 | Settable | TIM7 | TIM7 global interrupt | 0x0000 00EC |
| 44 | Settable | I2C1_EV | I2C1 event interrupt | 0x0000 00F0 |
| 45 | Settable | I2C1_ER | I2C1 error interrupt | 0x0000 00F4 |
| 46 | Settable | I3C1_EV | I3C1 event interrupt | 0x0000 00F8 |
| 47 | Settable | I3C1_ER | I3C1 error interrupt | 0x0000 00FC |
| 48 | Settable | SPI1 | SPI1 global interrupt | 0x0000 0100 |
| 49 | Settable | SPI2 | SPI2 global interrupt | 0x0000 0104 |
| 50 | Settable | SPI3 | SPI3 global interrupt | 0x0000 0108 |
| 51 | Settable | USART1 | USART1 global interrupt | 0x0000 010C |
| 52 | Settable | USART2 | USART2 global interrupt | 0x0000 0110 |
| 53 | Settable | USART3 | USART3 global interrupt | 0x0000 0114 |
Table 100. STM32C5 vector table (continued)
| IRQ number | Priority(1) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 54 | Settable | UART4 | UART4 global interrupt | 0x0000 0118 |
| 55 | Settable | UART5 | UART5 global interrupt | 0x0000 011C |
| 56 | Settable | LPUART1 | LPUART1 global interrupt | 0x0000 0120 |
| 57 | Settable | LPTIM1 | LPTIM1 global interrupt OR LPTIM1through EXTI line | 0x0000 0124 |
| 58 | Settable | TIM12 | TIM12 global interrupt | 0x0000 0128 |
| 59 | Settable | TIM15 | TIM15 global interrupt | 0x0000 012C |
| 60 | Settable | TIM16 | TIM16 global interrupt | 0x0000 0130 |
| 61 | Settable | TIM17 | TIM17 global interrupt | 0x0000 0134 |
| 62 | Settable | USB_FS | USB FS global interrupt | 0x0000 0138 |
| 63 | Settable | CRS | Clock recovery system global interrupt | 0x0000 013C |
| 64 | Settable | RNG | RNG global interrupt | 0x0000 0140 |
| 65 | Settable | FPU | Floating point interrupt | 0x0000 0144 |
| 66 | Settable | ICACHE | Instruction cache global interrupt | 0x0000 0148 |
| 67 | Settable | CORDIC | CORDIC interrupt | 0x0000 014C |
| 68 | Settable | AES | AES global interrupt | 0x0000 0150 |
| 69 | Settable | HASH | HASH interrupt | 0x0000 0154 |
| 70 | Settable | I2C2_EV | I2C2 event interrupt | 0x0000 0158 |
| 71 | Settable | I2C2_ER | I2C2 error interrupt | 0x0000 015C |
| 72 | Settable | TIM8_BRK TIM8_TERR TIM8_IERR | TIM8 break interrupt/TIM8 transition error/ TIM8 index error | 0x0000 0160 |
| 73 | Settable | TIM8_UP | TIM8 update interrupt | 0x0000 0164 |
| 74 | Settable | TIM8_TRG_COM TIM8_DIR TIM8_IDX | TIM8 trigger and commutation interrupt/ TIM8 direction change interrupt/TIM8 Index | 0x0000 0168 |
| 75 | Settable | TIM8_CC | TIM8 capture compare interrupt | 0x0000 016C |
| 76 | Settable | COMP1 | COMP1 global interrupt OR COMP1 through EXTI line | 0x0000 0170 |
| 77 | Settable | DAC1 | DAC1 global interrupt | 0x0000 0174 |
| 78 | Settable | LPDMA2_CH0 | LPDMA2 channel0 global interrupt | 0x0000 0178 |
| 79 | Settable | LPDMA2_CH1 | LPDMA2 channel1 global interrupt | 0x0000 017C |
| 80 | Settable | LPDMA2_CH2 | LPDMA2 channel2 global interrupt | 0x0000 0180 |
| 81 | Settable | LPDMA2_CH3 | LPDMA2 channe3 global interrupt | 0x0000 0184 |
| 82 | Settable | LPDMA2_CH4 | LPDMA2 channel4 global interrupt | 0x0000 0188 |
| 83 | Settable | LPDMA2_CH5 | LPDMA2 channel5 global interrupt | 0x0000 018C |
| 84 | Settable | LPDMA2_CH6 | LPDMA2 channel6 global interrupt | 0x0000 0190 |
Table 100. STM32C5 vector table (continued)
| IRQ number | Priority(1) | Acronym | Description | Address offset |
|---|---|---|---|---|
| 85 | Settable | LPDMA2_CH7 | LPDMA2 channel7 global interrupt | 0x0000 0194 |
| 86 | Settable | FDCAN2_IT0 | FDCAN2 Interrupt 0 | 0x0000 0198 |
| 87 | Settable | FDCAN2_IT1 | FDCAN2 Interrupt 1 | 0x0000 019C |
| 88 | Settable | COMP2 | COMP2 global interrupt OR COMP2 through EXTI line | 0x0000 01A0 |
| 89 | Settable | TIM3 | TIM3 global interrupt | 0x0000 01A4 |
| 90 | Settable | TIM4 | TIM4 global interrupt | 0x0000 01A8 |
| 91 | Settable | XSPI1 | XSPI1 global interrupt | 0x0000 01AC |
| 92 | Settable | SAES | SAES global interrupt | 0x0000 01B0 |
| 93 | Settable | PKA | PKA global interrupt | 0x0000 01B4 |
| 94 | Settable | ETH1 | ETH interrupt | 0x0000 01B8 |
| 95 | Settable | ETH1_WKUP | Ethernet wakeup interrupt through EXTI line | 0x0000 01BC |
| 96 | Settable | USART6 | USART6 global interrupt | 0x0000 01C0 |
| 97 | Settable | UART7 | UART7 global interrupt | 0x0000 01C4 |
| 98 | Settable | ADC3 | ADC3 global interrupt | 0x0000 01C8 |
- 1. 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.