16. Nested vectored interrupt controller (NVIC)
16.1 NVIC main features
- • 134 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.
All interrupts including the core exceptions are managed by the NVIC.
16.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. 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 × STCALIB)-1 - • When SysTick clock source is external clock (HCLK/8)
reload value = ((HCLK/8) × 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:
16.3 Interrupt and exception vectors
The grey rows in the table below describe the vectors without specific position.
Table 97. STM32H503xx vector table
| Position | Priority | Type of priority | Acronym | Description | Address |
|---|---|---|---|---|---|
| - | - | - | - | Reserved | 0x0000 0000 |
| - | -4 | fixed | Reset | Reset | 0x0000 0004 |
| - | -2 | fixed | NMI | Non maskable interrupt. The RCC Clock Security System (CSS) is linked to the NMI vector. | 0x0000 0008 |
| - | -1 | fixed | HardFault | Hard fault. All classes of fault | 0x0000 000C |
| - | 0 | settable | MemManage | Memory management | 0x0000 0010 |
| - | 1 | settable | BusFault | Pre-fetch fault, memory access fault | 0x0000 0014 |
| - | 2 | settable | UsageFault | Undefined instruction or invalid state | 0x0000 0018 |
| - | - | - | - | Reserved | 0x0000 001C - 0x0000 0028 |
| - | 4 | - | SVC | System service call via SWI instruction | 0x0000 002C |
| - | 5 | - | Debug Monitor | Monitor | 0x0000 0030 |
| - | - | - | - | Reserved | 0x0000 0034 |
| - | 6 | settable | PendSV | Pendable request for system service | 0x0000 0038 |
| - | 7 | settable | SysTick | System tick timer | 0x0000 003C |
| 0 | 8 | settable | WWDG | Window watchdog interrupt | 0x0000 0040 |
| 1 | 9 | settable | PVD_AVD | Power voltage monitor/ Analog voltage monitor | 0x0000 0044 |
| 2 | 10 | settable | RTC | RTC global interrupts | 0x0000 0048 |
| - | - | - | - | Reserved | 0x0000 004C |
| 4 | 12 | settable | TAMP | Tamper global interrupts | 0x0000 0050 |
| 5 | 13 | settable | RAMCFG | RAM configuration global interrupt | 0x0000 0054 |
| 6 | 14 | settable | FLASH | Flash global interrupt | 0x0000 0058 |
| - | - | - | - | Reserved | 0x0000 005C |
| - | - | - | - | Reserved | 0x0000 0060 |
| 9 | 17 | settable | RCC | RCC global interrupt | 0x0000 0064 |
| - | - | - | - | Reserved | 0x0000 0068 |
| 11 | 19 | settable | EXTI0 | EXTI Line0 interrupt | 0x0000 006C |
| 12 | 20 | settable | EXTI1 | EXTI Line1 interrupt | 0x0000 0070 |
| 13 | 21 | settable | EXTI2 | EXTI Line2 interrupt | 0x0000 0074 |
Table 97. STM32H503xx vector table (continued)
| Position | Priority | Type of priority | Acronym | Description | Address |
|---|---|---|---|---|---|
| 14 | 22 | settable | EXTI3 | EXTI Line3 interrupt | 0x0000 0078 |
| 15 | 23 | settable | EXTI4 | EXTI Line4 interrupt | 0x0000 007C |
| 16 | 24 | settable | EXTI5 | EXTI Line5 interrupt | 0x0000 0080 |
| 17 | 25 | settable | EXTI6 | EXTI Line6 interrupt | 0x0000 0084 |
| 18 | 26 | settable | EXTI7 | EXTI Line7 interrupt | 0x0000 0088 |
| 19 | 27 | settable | EXTI8 | EXTI Line8 interrupt | 0x0000 008C |
| 20 | 28 | settable | EXTI9 | EXTI Line9 interrupt | 0x0000 0090 |
| 21 | 29 | settable | EXTI10 | EXTI Line10 interrupt | 0x0000 0094 |
| 22 | 30 | settable | EXTI11 | EXTI Line11 interrupt | 0x0000 0098 |
| 23 | 31 | settable | EXTI12 | EXTI Line12 interrupt | 0x0000 009C |
| 24 | 32 | settable | EXTI13 | EXTI Line13 interrupt | 0x0000 00A0 |
| 25 | 33 | settable | EXTI14 | EXTI Line14 interrupt | 0x0000 00A4 |
| 26 | 34 | settable | EXTI15 | EXTI Line15 interrupt | 0x0000 00A8 |
| 27 | 35 | settable | GPDMA1_CH0 | GPDMA1 channel 0 global interrupt | 0x0000 00AC |
| 28 | 36 | settable | GPDMA1_CH1 | GPDMA1 channel 1 global interrupt | 0x0000 00B0 |
| 29 | 37 | settable | GPDMA1_CH2 | GPDMA1 channel 2 global interrupt | 0x0000 00B4 |
| 30 | 38 | settable | GPDMA1_CH3 | GPDMA1 channel 3 global interrupt | 0x0000 00B8 |
| 31 | 39 | settable | GPDMA1_CH4 | GPDMA1 channel 4 global interrupt | 0x0000 00BC |
| 32 | 40 | settable | GPDMA1_CH5 | GPDMA1 channel 5 global interrupt | 0x0000 00C0 |
| 33 | 41 | settable | GPDMA1_CH6 | GPDMA1 channel 6 global interrupt | 0x0000 00C4 |
| 34 | 42 | settable | GPDMA1_CH7 | GPDMA1 channel 7 global interrupt | 0x0000 00C8 |
| 35 | 43 | settable | IWDG | Independent watchdog interrupt | 0x0000 00CC |
| - | - | - | - | Reserved | 0x0000 00D0 |
| 37 | 45 | settable | ADC1 | ADC1 global interrupt | 0x0000 00D4 |
| 38 | 46 | settable | DAC1 | DAC1 global interrupt | 0x0000 00D8 |
| 39 | 47 | settable | FDCAN1_IT0 | FDCAN1 Interrupt 0 | 0x0000 00DC |
| 40 | 48 | settable | FDCAN1_IT1 | FDCAN1 Interrupt 1 | 0x0000 00E0 |
| 41 | 49 | settable | TIM1_BRK/TIM1_TERR/ TIM1_IERR | TIM1 break/TIM1 transition error/TIM1 index error | 0x0000 00E4 |
| 42 | 50 | settable | TIM1_UP | TIM1 update | 0x0000 00E8 |
Table 97. STM32H503xx vector table (continued)
| Position | Priority | Type of priority | Acronym | Description | Address |
|---|---|---|---|---|---|
| 43 | 51 | settable | TIM1_TRG_COM/TIM1_DIR/TIM1_IDX | TIM1 trigger and commutation/TIM1 direction change interrupt/TIM1 index | 0x0000 00EC |
| 44 | 52 | settable | TIM1_CC | TIM1 capture compare interrupt | 0x0000 00F0 |
| 45 | 53 | settable | TIM2 | TIM2 global interrupt | 0x0000 00F4 |
| 46 | 54 | settable | TIM3 | TIM3 global interrupt | 0x0000 00F8 |
| - | - | - | - | Reserved | 0x0000 00FC - 0x0000 0100 |
| 49 | 57 | settable | TIM6 | TIM6 global interrupt | 0x0000 0104 |
| 50 | 58 | settable | TIM7 | TIM7 global interrupt | 0x0000 0108 |
| 51 | 59 | settable | I2C1_EV | I2C1 event interrupt | 0x0000 010C |
| 52 | 60 | settable | I2C1_ER | I2C1 error interrupt | 0x0000 0110 |
| 53 | 61 | settable | I2C2_EV | I2C2 event interrupt | 0x0000 0114 |
| 54 | 62 | settable | I2C2_ER | I2C2 error interrupt | 0x0000 0118 |
| 55 | 63 | settable | SPI1 | SPI1 global interrupt | 0x0000 011C |
| 56 | 64 | settable | SPI2 | SPI2 global interrupt | 0x0000 0120 |
| 57 | 65 | settable | SPI3 | SPI3 global interrupt | 0x0000 0124 |
| 58 | 66 | settable | USART1 | USART1 global interrupt | 0x0000 0128 |
| 59 | 67 | settable | USART2 | USART2 global interrupt | 0x0000 012C |
| 60 | 68 | settable | USART3 | USART3 global interrupt | 0x0000 0130 |
| - | - | - | - | Reserved | 0x0000 0134 - 0x0000 0138 |
| 63 | 71 | settable | LPUART1 | LPUART1 global interrupt or LPUART1 R wakeup or LPUART1 T wakeup through EXTI line | 0x0000 013C |
| 64 | 72 | settable | LPTIM1 OR LPTIM1_AIT | LPTIM1 global interrupt or LPTimer1 AIT through EXTI line | 0x0000 0140 |
| - | - | - | - | Reserved | 0x0000 0144 - 0x0000 0154 |
| 70 | 78 | settable | LPTIM2 OR LPTIM2_AIT | LPTIM2 global interrupt or LPTimer2 AIT through EXTI line | 0x0000 0158 |
| - | - | - | - | Reserved | 0x0000 015C - 0x0000 0164 |
| 74 | 82 | settable | USB | USB global interrupt | 0x0000 0168 |
Table 97. STM32H503xx vector table (continued)
| Position | Priority | Type of priority | Acronym | Description | Address |
|---|---|---|---|---|---|
| 75 | 83 | settable | CRS | Clock recovery system global interrupt | 0x0000 016C |
| - | - | - | - | Reserved | 0x0000 0170 - 0x0000 018C |
| 90 | 98 | settable | GPDMA2_CH0 | GPDMA2 channel0 global interrupt | 0x0000 0190 |
| 91 | 99 | settable | GPDMA2_CH1 | GPDMA2 channel1 global interrupt | 0x0000 0194 |
| 92 | 100 | settable | GPDMA2_CH2 | GPDMA2 channel2 global interrupt | 0x0000 0198 |
| 93 | 101 | settable | GPDMA2_CH3 | GPDMA2 channel3 global interrupt | 0x0000 019C |
| 94 | 102 | settable | GPDMA2_CH4 | GPDMA2 channel4 global interrupt | 0x0000 01A0 |
| 95 | 103 | settable | GPDMA2_CH5 | GPDMA2 channel5 global interrupt | 0x0000 01A4 |
| 96 | 104 | settable | GPDMA2_CH6 | GPDMA2 channel6 global interrupt | 0x0000 01A8 |
| 97 | 105 | settable | GPDMA2_CH7 | GPDMA2 channel7 global interrupt | 0x0000 01AC |
| - | - | - | - | Reserved | 0x0000 01B0 - 0x0000 01C0 |
| 103 | 111 | settable | FPU | Floating point interrupt | 0x0000 01C4 |
| 104 | 112 | settable | ICACHE | Instruction cache global interrupt | 0x0000 01C8 |
| - | - | - | - | Reserved | 0x0000 01CC - 0x0000 01E8 |
| 113 | 121 | settable | DTS OR DTS_WKUP | DTS interrupt or DTS AIT through EXTI line | 0x0000 01EC |
| 114 | 122 | settable | RNG | RNG global interrupt | 0x0000 01F0 |
| - | - | - | - | Reserved | 0x0000 01F4 - 0x0000 01F8 |
| 117 | 125 | settable | HASH | HASH interrupt | 0x0000 01FC |
| - | - | - | - | Reserved | 0x0000 0200 - 0x0000 0210 |
| 123 | 131 | settable | I3C1_EV | I3C1 event interrupt | 0x0000 0214 |
| 124 | 132 | settable | I3C1_ER | I3C1 error interrupt | 0x0000 0218 |
| - | - | - | - | Reserved | 0x0000 021C - 0x0000 0230 |
| 131 | 139 | settable | I3C2_EV | I3C2 event interrupt | 0x0000 0234 |
| 132 | 140 | settable | I3C2_ER | I3C2 error interrupt | 0x0000 0238 |
| 133 | 141 | settable | COMP | COMP global interrupt | 0x0000 023C |