19. Nested vectored interrupt controller (NVIC)
19.1 NVIC features
The NVIC includes the following features:
- • up to 140 maskable interrupt channels for STM32H7xxx (not including the 16 interrupt lines of Cortex®-M7 with FPU)
- • 16 programmable priority levels (4 bits of interrupt priority are 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, which enables low latency interrupt processing and efficient processing of late arriving interrupts.
All interrupts, including the core exceptions, are managed by the NVIC.
For more information on exceptions and NVIC programming, refer to PM0253 programming manual for Cortex®-M7.
19.1.1 SysTick calibration value register
The SysTick calibration value (SYST_CALIB) is fixed to 0x3E8. It provides a reference timebase of 1 ms based when the SysTick clock frequency is 1 MHz. To match the 1 ms timebase whatever the application frequency, the SysTick reload value must be programmed as follows in the SYST_RVR register:
- • The SysTick clock source is the 100 MHz CPU clock (HCLK):
- • or the SysTick clock source is an external clock:
where \( F_{\text{HCLK}} \) refers to the AHB frequency expressed in MHz.
For example, to achieve a timebase of 1 ms when the SysTick clock source is the 100 MHz HCLK:
19.1.2 Interrupt and exception vectors
The exception vectors connected to the NVIC are the following: reset, NMI, HardFault, MemManage, Bus Fault, UsageFault, SVCall, DebugMonitor, PendSV, SysTick.
Table 140. NVIC (1)
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| - | - | - | - | Reserved | 0x0000 0000 |
| - | -3 | - | Reset | Reset | 0x0000 0004 |
| - | -2 | - | NMI | Non maskable interrupt. The HSE clock security system (CSS) is linked to the NMI vector. | 0x0000 0008 |
| - | -1 | - | HardFault | All class of fault | 0x0000 000C |
| - | 0 | - | MemManage | Memory management | 0x0000 0010 |
| - | 1 | - | BusFault | Prefetch fault, memory access fault | 0x0000 0014 |
| - | 2 | - | UsageFault | Undefined instruction or illegal state | 0x0000 0018 |
| - | - | - | - | Reserved | 0x0000 001C - 0x0000 002B |
| - | 3 | - | SVCall | System service call via SWI instruction | 0x0000 002C |
| - | 4 | - | Debug Monitor | Debug Monitor | 0x0000 0030 |
| - | - | - | - | Reserved | 0x0000 0034 |
| - | 5 | - | PendSV | Pendable request for system service | 0x0000 0038 |
| - | 6 | - | SysTick | SystemTick timer | 0x0000 003C |
| wwdg1_it | 7 | 0 | WWDG1 | Window watchdog interrupt | 0x0000 0040 |
| exti_pwr_pvd_wkup | 8 | 1 | PVD_PVM | PVD detection interrupt through the EXTI line | 0x0000 0044 |
| exti_tamp_rtc_wkup | 9 | 2 | RTC_TAMP_ STAMP_CSS_ LSE | RTC tamper and timestamp interrupts through the EXTI line | 0x0000 0048 |
| lsecss_rcc_it | LSE clock security system interrupt | ||||
| exti_wkup_rtc_wkup | 10 | 3 | RTC_WKUP | RTC Wakeup interrupt through the EXTI line | 0x0000 004C |
| flash_it | 11 | 4 | FLASH | Flash memory interface | 0x0000 0050 |
| rcc_it | 12 | 5 | RCC | RCC global interrupt | 0x0000 0054 |
| exti_exti0_wkup | 13 | 6 | EXTI0 | EXTI line 0 interrupt | 0x0000 0058 |
| exti_exti1_wkup | 14 | 7 | EXTI1 | EXTI line 1 interrupt | 0x0000 005C |
| exti_exti2_wkup | 15 | 8 | EXTI2 | EXTI line 2 interrupt | 0x0000 0060 |
| exti_exti3_wkup | 16 | 9 | EXTI3 | EXTI line 3 interrupt | 0x0000 0064 |
| exti_exti4_wkup | 17 | 10 | EXTI4 | EXTI line 4 interrupt | 0x0000 0068 |
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| dma1_it0 | 18 | 11 | DMA1_STR0 | DMA1 stream0 global interrupt | 0x0000 006C |
| dma1_it1 | 19 | 12 | DMA1_STR1 | DMA1 stream1 global interrupt | 0x0000 0070 |
| dma1_it2 | 20 | 13 | DMA1_STR2 | DMA1 stream2 global interrupt | 0x0000 0074 |
| dma1_it3 | 21 | 14 | DMA1_STR3 | DMA1 stream3 global interrupt | 0x0000 0078 |
| dma1_it4 | 22 | 15 | DMA1_STR4 | DMA1 stream4 global interrupt | 0x0000 007C |
| dma1_it5 | 23 | 16 | DMA1_STR5 | DMA1 stream5 global interrupt | 0x0000 0080 |
| dma1_it6 | 24 | 17 | DMA1_STR6 | DMA1 stream6 global interrupt | 0x0000 0084 |
| adc1_it | 25 | 18 | ADC1_2 | ADC1 and ADC2 global interrupt | 0x0000 0088 |
| adc2_it | |||||
| ttfdcan_intr0_it | 26 | 19 | FDCAN1_IT0 | FDCAN1 interrupt line 0 | 0x0000 008C |
| fdcan_intr0_it | 27 | 20 | FDCAN2_IT0 | FDCAN2 interrupt line 0 | 0x0000 0090 |
| ttfdcan_intr1_it | 28 | 21 | FDCAN1_IT1 | FDCAN1 interrupt line 1 | 0x0000 0094 |
| fdcan_intr1_it | 29 | 22 | FDCAN2_IT1 | FDCAN2 interrupt line 1 | 0x0000 0098 |
| exti_exti9_wkup | 30 | 23 | EXTI9_5 | EXTI Line[9:5] interrupts | 0x0000 009C |
| exti_exti8_wkup | |||||
| exti_exti7_wkup | |||||
| exti_exti6_wkup | |||||
| exti_exti5_wkup | |||||
| tim1_brk_it | 31 | 24 | TIM1_BRK | TIM1 break interrupt | 0x0000 00A0 |
| tim1_upd_it | 32 | 25 | TIM1_UP | TIM1 update interrupt | 0x0000 00A4 |
| tim1_trg_it | 33 | 26 | TIM1_TRG_COM | TIM1 trigger and commutation interrupts | 0x0000 00A8 |
| tim1_cc_it | 34 | 27 | TIM1_CC | TIM1 capture/compare interrupt | 0x0000 00AC |
| tim2_it | 35 | 28 | TIM2 | TIM2 global interrupt | 0x0000 00B0 |
| tim3_it | 36 | 29 | TIM3 | TIM3 global interrupt | 0x0000 00B4 |
| tim4_it | 37 | 30 | TIM4 | TIM4 global interrupt | 0x0000 00B8 |
| i2c1_ev_it | 38 | 31 | I2C1_EV | I2C1 event interrupt | 0x0000 00BC |
| exti_i2c1_ev_wkup | |||||
| i2c1_err_it | 39 | 32 | I2C1_ER | I2C1 global error interrupt | 0x0000 00C0 |
| i2c2_ev_it | 40 | 33 | I2C2_EV | I2C2 global event interrupt | 0x0000 00C4 |
| exti_i2c2_ev_wkup | |||||
| i2c2_err_it | 41 | 34 | I2C2_ER | I2C 2 global error interrupt | 0x0000 00C8 |
| spi1_it | 42 | 35 | SPI1 | SPI1 global interrupt | 0x0000 00CC |
| exti_spi1_it |
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| spi2_it | 43 | 36 | SPI2 | SPI2 global interrupt | 0x0000 00D0 |
| exti_spi2_it | |||||
| usart1_gbl_it | 44 | 37 | USART1 | USART1 global interrupt | 0x0000 00D4 |
| exti_usart1_wkup | |||||
| usart2_gbl_it | 45 | 38 | USART2 | USART2 global interrupt | 0x0000 00D8 |
| exti_usart2_wkup | |||||
| usart3_gbl_it | 46 | 39 | USART3 | USART3 global interrupt | 0x0000 00DC |
| exti_usart3_wkup | |||||
| exti_exti15_wkup | 47 | 40 | EXTI15_10 | EXTI Line[15:10] interrupts | 0x0000 00E0 |
| exti_exti14_wkup | |||||
| exti_exti13_wkup | |||||
| exti_exti12_wkup | |||||
| exti_exti11_wkup | |||||
| exti_exti10_wkup | |||||
| exti_rtc_al | 48 | 41 | RTC_ALARM | RTC alarms (A and B) through EXTI lines | 0x0000 00E4 |
| - | - | - | - | Reserved | 0x0000 00E8 |
| tim8_brk_it | 50 | 43 | TIM8_BRK_TIM12 | TIM8 Break interrupt and TIM12 global interrupt | 0x0000 00EC |
| tim12_gbl_it | |||||
| tim8_upd_it | 51 | 44 | TIM8_UP_TIM13 | TIM8 Update interrupt and TIM13 global interrupt | 0x0000 00F0 |
| tim13_gbl_it | |||||
| tim8_trg_it | 52 | 45 | TIM8_TRG_COM_TIM14 | TIMER8 trigger/commutation interrupt and TIM14 global interrupt | 0x0000 00F4 |
| tim14_gbl_it | |||||
| tim8_cc_it | 53 | 46 | TIM8_CC | TIM8 capture/compare interrupt | 0x0000 00F8 |
| dma1_it7 | 54 | 47 | DMA1_STR7 | DMA1 stream7 global interrupt | 0x0000 00FC |
| fmc_gbl_it | 55 | 48 | FMC | FMC global interrupt | 0x0000 0100 |
| sdmmc_it | 56 | 49 | SDMMC1 | SDMMC1 global interrupt | 0x0000 0104 |
| tim5_gbl_it | 57 | 50 | TIM5 | TIM5 global interrupt | 0x0000 0108 |
| spi3_it | 58 | 51 | SPI3 | SPI3 global interrupt | 0x0000 010C |
| exti_spi3_wkup | |||||
| uart4_gbl_it | 59 | 52 | UART4 | UART4 global interrupt | 0x0000 0110 |
| exti_uart4_wkup | |||||
| uart5_gbl_it | 60 | 53 | UART5 | UART 5 global interrupt | 0x0000 0114 |
| exti_uart5_wkup |
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| tim6_gbl_it | 61 | 54 | TIM6_DAC | TIM6 global interrupt, DAC1 and DAC2 interrupts | 0x0000 0118 |
| dac_unr_it | |||||
| tim7_gbl_it | 62 | 55 | TIM7 | TIM7 global interrupt | 0x0000 011C |
| dma2_it0 | 63 | 56 | DMA2_STR0 | DMA2 stream0 global interrupt | 0x0000 0120 |
| dma2_it1 | 64 | 57 | DMA2_STR1 | DMA2 stream1 global interrupt | 0x0000 0124 |
| dma2_it2 | 65 | 58 | DMA2_STR2 | DMA2 stream2 global interrupt | 0x0000 0128 |
| dma2_it3 | 66 | 59 | DMA2_STR3 | DMA2 stream3 global interrupt | 0x0000 012C |
| dma2_it4 | 67 | 60 | DMA2_STR4 | DMA2 stream4 global interrupt | 0x0000 0130 |
| eth_sbd_intr_it | 68 | 61 | ETH | Ethernet interrupt | 0x0000 0134 |
| exti_eth_wkup | 69 | 62 | ETH_WKUP | ETHERNET wakeup interrupt through EXTI line | 0x0000 0138 |
| fdcan_cal_it | 70 | 63 | FDCAN_CAL | FDCAN calibration interrupt | 0x0000 013C |
| - | - | - | - | Reserved | 0x0000 0140 |
| - | - | - | - | Reserved | 0x0000 0144 |
| - | - | - | - | Reserved | 0x0000 0148 |
| - | - | - | - | Reserved | 0x0000 014C |
| dma2_it5 | 75 | 68 | DMA2_STR5 | DMA2 stream5 global interrupt | 0x0000 0150 |
| dma2_it6 | 76 | 69 | DMA2_STR6 | DMA2 stream6 global interrupt | 0x0000 0154 |
| dma2_it7 | 77 | 70 | DMA2_STR7 | DMA2 stream7 global interrupt | 0x0000 0158 |
| usart6_gbl_it | 78 | 71 | USART6 | USART6 global interrupt | 0x0000 015C |
| exti_usart6_wkup | |||||
| i2c3_ev_it | 79 | 72 | I2C3_EV | I2C3 event interrupt | 0x0000 0160 |
| exti_i2c3_ev_wkup | |||||
| i2c3_err_it | 80 | 73 | I2C3_ER | I2C3 error interrupt | 0x0000 0164 |
| usb1_out_it | 81 | 74 | OTG_HS_EP1_OUT | USB OTG_HS OUT endpoint1 global interrupt | 0x0000 0168 |
| usb1_in_it | 82 | 75 | OTG_HS_EP1_IN | USB OTG_HS IN endpoint1 global interrupt | 0x0000 016C |
| exti_usb1_wkup | 83 | 76 | OTG_HS_WKUP | USB OTG_HS wakeup Interrupt through EXTI line | 0x0000 0170 |
| usb1_gbl_it | 84 | 77 | OTG_HS | USB OTG_HS global interrupt | 0x0000 0174 |
| dcmi_pssi_it | 85 | 78 | DCMI_PSSI | DCMI/PSSI global interrupt | 0x0000 0178 |
| cryp_it | 86 | 79 | CRYP | CRYP global interrupt | 0x0000 017C |
| hash_rng_it | 87 | 80 | HASH_RNG | HASH OR RNG interrupt | 0x0000 0180 |
| cpu_fpu_it | 88 | 81 | FPU | CPU FPU global interrupt | 0x0000 0184 |
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| uart7_gbl_it | 89 | 82 | UART7 | UART7 global interrupt | 0x0000 0188 |
| exti_uart7_wkup | |||||
| uart8_gbl_it | 90 | 83 | UART8 | UART8 global interrupt | 0x0000 018C |
| exti_uart8_wkup | |||||
| spi4_it | 91 | 84 | SPI4 | SPI4 global interrupt | 0x0000 0190 |
| exti_spi4_wkup | |||||
| spi5_it | 92 | 85 | SPI5 | SPI5 global interrupt | 0x0000 0194 |
| exti_spi5_wkup | |||||
| spi6_it | 93 | 86 | SPI6 | SPI6 global interrupt | 0x0000 0198 |
| exti_spi6_wkup | |||||
| sai1_it | 94 | 87 | SAI1 | SAI1 global interrupt | 0x0000 019C |
| ltdc_it | 95 | 88 | LTDC | LCD-TFT global interrupt | 0x0000 01A0 |
| ltdc_err_it | 96 | 89 | LTDC_ERR | LCD-TFT global Error interrupt | 0x0000 01A4 |
| dma2d_gbl_it | 97 | 90 | DMA2D | DMA2D global interrupt | 0x0000 01A8 |
| - | - | - | - | Reserved | 0x0000 01AC |
| octospi1_it | 99 | 92 | OCTOSPI1 | OCTOSPI1 global interrupt | 0x0000 01B0 |
| lptim1_it | 100 | 93 | LPTIM1 | LPTIM1 global interrupt | 0x0000 01B4 |
| exti_lptim1_wkup | |||||
| cec_it | 101 | 94 | CEC | HDMI-CEC global interrupt | 0x0000 01B8 |
| exti_cec_wkup | |||||
| i2c4_ev_it | 102 | 95 | I2C4_EV | I2C4 event interrupt | 0x0000 01BC |
| exti_i2c4_wkup | |||||
| i2c4_errit | 103 | 96 | I2C4_ER | I2C4 error interrupt | 0x0000 01C0 |
| spdifrx_it | 104 | 97 | SPDIF | SPDIFIRX global interrupt | 0x0000 01C4 |
| - | - | - | - | Reserved | 0x0000 01C8 |
| - | - | - | - | Reserved | 0x0000 01CC |
| - | - | - | - | Reserved | 0x0000 01D0 |
| - | - | - | - | Reserved | 0x0000 01D4 |
| dmamux1_ovr_it | 109 | 102 | DMAMUX1_OV | DMAMUX1 overrun interrupt | 0x0000 01D8 |
| - | - | - | - | Reserved | 0x0000 01DC |
| - | - | - | - | Reserved | 0x0000 01E0 |
| - | - | - | - | Reserved | 0x0000 01E4 |
| - | - | - | - | Reserved | 0x0000 01E8 |
| - | - | - | - | Reserved | 0x0000 01EC |
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| - | - | - | - | Reserved | 0x0000 01F0 |
| - | - | - | - | Reserved | 0x0000 01F4 |
| dfsdm1_it0 | 117 | 110 | DFSDM1_FLT0 | DFSDM1 filter 0 interrupt | 0x0000 01F8 |
| dfsdm1_it1 | 118 | 111 | DFSDM1_FLT1 | DFSDM1 filter 1 interrupt | 0x0000 01FC |
| dfsdm1_it2 | 119 | 112 | DFSDM1_FLT2 | DFSDM1 filter 2 interrupt | 0x0000 0200 |
| dfsdm1_it3 | 120 | 113 | DFSDM1_FLT3 | DFSDM1 filter 3 interrupt | 0x0000 0204 |
| - | - | - | - | Reserved | 0x0000 0208 |
| swpmi_gbl_it | 122 | 115 | SWPMI1 | SWPMI global interrupt OR Slave Resume asynchronous interrupt | 0x0000 020C |
| exti_swpmi_wkup | |||||
| tim15_gbl_it | 123 | 116 | TIM15 | TIM15 global interrupt | 0x0000 0210 |
| tim16_gbl_it | 124 | 117 | TIM16 | TIM16 global interrupt | 0x0000 0214 |
| tim17_gbl_it | 125 | 118 | TIM17 | TIM17 global interrupt | 0x0000 0218 |
| exti_mdios_wkup | 126 | 119 | MDIOS_WKUP | MDIOS wakeup interrupt through EXTI line | 0x0000 021C |
| mdios_it | 127 | 120 | MDIOS | MDIO global interrupt | 0x0000 0220 |
| - | - | - | - | Reserved | 0x0000 0224 |
| mdma_it | 129 | 122 | MDMA | MDMA global interrupt | 0x0000 0228 |
| - | - | - | - | Reserved | 0x0000 022C |
| sdmmc_it | 131 | 124 | SDMMC2 | SDMMC2 global interrupt | 0x0000 0230 |
| hsem1_it | 132 | 125 | HSEM0 | HSEM global interrupt 1 | 0x0000 0234 |
| - | - | - | - | Reserved | 0x0000 0238 |
| adc3_it | 134 | 127 | ADC3 | ADC3 global interrupt | 0x0000 023C |
| dmamux2_ovr_it | 135 | 128 | DMAMUX2_OVR | DMAMUX2 overrun interrupt | 0x0000 0240 |
| bdma_ch0_it | 136 | 129 | BDMA_CH0 | BDMA channel 0 interrupt | 0x0000 0244 |
| bdma_ch1_it | 137 | 130 | BDMA_CH1 | BDMA channel 1 interrupt | 0x0000 0248 |
| bdma_ch2_it | 138 | 131 | BDMA_CH2 | BDMA channel 2 interrupt | 0x0000 024C |
| bdma_ch3_it | 139 | 132 | BDMA_CH3 | BDMA channel 3 interrupt | 0x0000 0250 |
| bdma_ch4_it | 140 | 133 | BDMA_CH4 | BDMA channel 4 interrupt | 0x0000 0254 |
| bdma_ch5_it | 141 | 134 | BDMA_CH5 | BDMA channel 5 interrupt | 0x0000 0258 |
| bdma_ch6_it | 142 | 135 | BDMA_CH6 | BDMA channel 6 interrupt | 0x0000 025C |
| bdma_ch7_it | 143 | 136 | BDMA_CH7 | BDMA channel 7 interrupt | 0x0000 0260 |
| comp_gbl_it | 144 | 137 | COMP | COMP1 and COMP2 global Interrupt | 0x0000 0264 |
| exti_comp1_wkup | |||||
| exti_comp2_wkup |
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| lptim2_it | 145 | 138 | LPTIM2 | LPTIM2 global interrupt | 0x0000 0268 |
| exti_lptim2_wkup | |||||
| lptim3_it | 146 | 139 | LPTIM3 | LPTIM3 global interrupt | 0x0000 026C |
| exti_lptim3_wkup | |||||
| lptim4_it | 147 | 140 | LPTIM4 | LPTIM4 global interrupt | 0x0000 0270 |
| exti_lptim4_wkup | |||||
| lptim5_it | 148 | 141 | LPTIM5 | LPTIM5 global interrupt | 0x0000 0274 |
| exti_lptim5_wkup | |||||
| lpuart_gbl_it | 149 | 142 | LPUART | LPUART1 global interrupt | 0x0000 0278 |
| exti_lpuart_rx_it | |||||
| exti_lpuart_tx_it | |||||
| - | - | - | - | Reserved | 0x0000 027C |
| crs_it | 151 | 144 | CRS | Clock recovery global interrupt | 0x0000 0280 |
| ecc_it | 152 | 145 | ECC_DIAG_IT | ECC diagnostic global interrupt | 0x0000 0284 |
| sai4_it | 153 | 146 | SAI4 | SAI4 global interrupt | 0x0000 0288 |
| temp_it | 154 | 147 | TEMP_IT | Temperature sensor global interrupt | 0x0000 028C |
| exti_temp_wkup | |||||
| - | - | - | - | Reserved | 0x0000 0290 |
| exti_wkup1_wkup | 156 | 149 | WKUP | Interrupt for 4 wakeup pins (1, 2, 4, 6) through EXTI line | 0x0000 0294 |
| exti_wkup2_wkup | |||||
| exti_wkup4_wkup | |||||
| exti_wkup6_wkup | |||||
| octospi2_it | 157 | 150 | OCTOSPI2 | OCTOSPI2 global interrupt | 0x0000 0298 |
| otfdec1_it | 158 | 151 | OTFDEC1 | OTFDEC1 interrupt | 0x0000 029C |
| otfdec2_it | 159 | 152 | OTFDEC2 | OTFDEC2 interrupt | 0x0000 02A0 |
| fmac_it | 160 | 153 | FMAC | FMAC interrupt | 0x0000 02A4 |
| cordic_it | 161 | 154 | CORDIC_IT | CORDIC interrupt | 0x0000 02A8 |
| exti_uart9_wkup | 162 | 155 | UART9 | UART9 interrupt | 0x0000 02AC |
| usart10_gbl_it | 163 | 156 | USART10 | USART10 interrupt | 0x0000 02B0 |
| exti_usart10_wkup | |||||
| i2c5_ev_it | 164 | 157 | I2C5_EV | I2C5 event interrupt | 0x0000 02B4 |
| exti_i2c5_ev_wkup | |||||
| i2c5_err_it | 165 | 158 | I2C5_ER | I2C5 error interrupt | 0x0000 02B8 |
| ttfdcan_intr2_it | 166 | 159 | FDCAN3_IT0 | FDCAN3 interrupt line 0 | 0x0000 02BC |
| Signal(s) | Priority | NVIC position | Acronym | Description | Address |
|---|---|---|---|---|---|
| fdcan_intr2_it | 167 | 160 | FDCAN3_IT1 | FDCAN3 interrupt line 1 | 0x0000 02C0 |
| tim23_it | 168 | 161 | TIM23 | TIM23 global interrupt | 0x0000 02C4 |
| tim24_it | 169 | 162 | TIM24 | TIM24 global interrupt | 0x0000 02C8 |
- 1. When different signals are connected to the same NVIC interrupt line, they are ORed.