19. Nested vectored interrupt controller (NVIC)
19.1 NVIC features
The NVIC includes the following features:
- • up to 150 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 145. NVIC (1)
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| - | - | - | - | Reserved | 0x0000 0000 |
| - | -3 | - | Reset | Reset | 0x0000 0004 |
| - | -2 | - | NMI | Non maskable interrupt. The RCC Clock Security System (CSS) is linked to the NMI vector. | 0x0000 0008 |
| - | -1 | - | HardFault | All classes 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 | - | DebugMonitor | Debug monitor | 0x0000 0030 |
| - | - | - | - | Reserved | 0x0000 0034 |
| - | 5 | - | PendSV | Pendable request for system service | 0x0000 0038 |
| - | 6 | - | SysTick | System tick timer | 0x0000 003C |
| wwdg1_it | 7 | 0 | WWDG1 | Window Watchdog interrupt | 0x0000 0040 |
| exti_pwr_pvd_wkup | 8 | 1 | PVD_PVM | PVD through EXTI line detection interrupt | 0x0000 0044 |
| exti_tamp_rtc_wkup | 9 | 2 | RTC_TAMP_STAMP_ CSS_LSE | RTC tamper, timestamp | 0x0000 0048 |
| lsecss_rcc_it | CSS LSE | ||||
| exti_wkup_rtc_wkup | 10 | 3 | RTC_WKUP | RTC Wakeup interrupt through the EXTI line | 0x0000 004C |
| flash_it | 11 | 4 | FLASH | Flash memory global interrupt | 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 |
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| exti_exti3_wkup | 16 | 9 | EXTI3 | EXTI Line 3 interrupt | 0x0000 0064 |
| exti_exti4_wkup | 17 | 10 | EXTI4 | EXTI Line 4 interrupt | 0x0000 0068 |
| dma1_it0 | 18 | 11 | DMA_STR0 | DMA1 Stream0 global interrupt | 0x0000 006C |
| dma1_it1 | 19 | 12 | DMA_STR1 | DMA1 Stream1 global interrupt | 0x0000 0070 |
| dma1_it2 | 20 | 13 | DMA_STR2 | DMA1 Stream2 global interrupt | 0x0000 0074 |
| dma1_it3 | 21 | 14 | DMA_STR3 | DMA1 Stream3 global interrupt | 0x0000 0078 |
| dma1_it4 | 22 | 15 | DMA_STR4 | DMA1 Stream4 global interrupt | 0x0000 007C |
| dma1_it5 | 23 | 16 | DMA_STR5 | DMA1 Stream5 global interrupt | 0x0000 0080 |
| dma1_it6 | 24 | 17 | DMA_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 0 | 0x0000 008C |
| fdcan_intr0_it | 27 | 20 | FDCAN2_IT0 | FDCAN2 Interrupt 0 | 0x0000 0090 |
| ttfdcan_intr1_it | 28 | 21 | FDCAN1_IT1 | FDCAN1 Interrupt 1 | 0x0000 0094 |
| fdcan_intr1_it | 29 | 22 | FDCAN2_IT1 | FDCAN2 Interrupt 1 | 0x0000 0098 |
| exti_exti5_wkup | 30 | 23 | EXTI9_5 | EXTI Line[9:5] interrupts | 0x 0000 009C |
| exti_exti6_wkup | |||||
| exti_exti7_wkup | |||||
| exti_exti8_wkup | |||||
| exti_exti9_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 | TIM_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 |
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| i2c1_ev_it | 38 | 31 | I2C1_EV | I2C1 event interrupt | 0x0000 00BC |
| exti_i2c1_ev_wkup | |||||
| i2c1_err_it | 39 | 32 | I2C1_ER | I2C1 error interrupt | 0x0000 00C0 |
| i2c2_ev_it | 40 | 33 | I2C2_EV | I2C2 event interrupt | 0x0000 00C4 |
| exti_i2c2_ev_wkup | |||||
| i2c2_err_it | 41 | 34 | I2C2_ER | I2C2 error interrupt | 0x0000 00C8 |
| spi1_it | 42 | 35 | SPI1 | SPI1 global interrupt | 0x0000 00CC |
| exti_spi1_it | |||||
| 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_exti10_it | 47 | 40 | EXTI15_10 | EXTI Line[15:10] interrupts | 0x0000 00E0 |
| exti_exti11_wkup | |||||
| exti_exti12_wkup | |||||
| exti_exti13_wkup | |||||
| exti_exti14_wkup | |||||
| exti_exti15_wkup | |||||
| exti_rtc_al | 48 | 41 | RTC_ALARM | RTC alarms (A and B) through EXTI Line interrupts | 0x0000 00E4 |
| - | 49 | 42 | - | - | 0x0000 00E8 |
| tim8_brk_it | 50 | 43 | TIM8_BRK_TIM12 | TIM8 break and TIM12 global interrupts | 0x0000 00EC |
| tim12_gbl_it | |||||
| tim8_upd_it | 51 | 44 | TIM8_UP_TIM13 | TIM8 update and TIM13 global interrupts | 0x0000 00F0 |
| tim13_gbl_it | |||||
| tim8_trg_it | 52 | 45 | TIM8_TRG_COM_TIM14 | TIM8 trigger /commutation and TIM14 global interrupts | 0x0000 00F4 |
| tim14_gbl_it | |||||
| tim8_cc_it | 53 | 46 | TIM8_CC | TIM8 capture / compare interrupts | 0x0000 00F8 |
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| 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 | SDMMC 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 | UART5 global interrupt | 0x0000 0114 |
| exti_uart5_wkup | |||||
| tim6_gbl_it | 61 | 54 | TIM6_DAC | TIM6 global interrupt | 0x0000 0118 |
| dac_unr_it | DAC underrun error interrupt | ||||
| tim7_gbl_it | 62 | 55 | TIM7 | TIM7 global interrupt | 0x0000 011C |
| dma2_it0 | 63 | 56 | DMA2_STR0 | DMA2 Stream0 interrupt | 0x0000 0120 |
| dma2_it1 | 64 | 57 | DMA2_STR1 | DMA2 Stream1 interrupt | 0x0000 0124 |
| dma2_it2 | 65 | 58 | DMA2_STR2 | DMA2 Stream2 interrupt | 0x0000 0128 |
| dma2_it3 | 66 | 59 | DMA2_STR3 | DMA2 Stream3 interrupt | 0x0000 012C |
| dma2_it4 | 67 | 60 | DMA2_STR4 | DMA2 Stream4 interrupt | 0x0000 0130 |
| eth_sbd_intr_it | 68 | 61 | ETH | Ethernet global interrupt | 0x0000 0134 |
| exti_eth_wkup | 69 | 62 | ETH_WKUP | Ethernet wakeup through EXTI line interrupt | 0x0000 0138 |
| fdcan_cal_it | 70 | 63 | FDCAN_CAL | FDCAN calibration interrupts | 0x0000 013C |
| cm7_sev_it | 71 | 64 | - | Arm ® Cortex ® -M7 Send even interrupt | 0x0000 0140 |
| NC | 72 | 65 | - | - | 0x0000 0144 |
| NC | 73 | 66 | - | - | 0x0000 0148 |
| NC | 74 | 67 | - | - | 0x0000 014C |
| dma2_it5 | 75 | 68 | DMA2_STR5 | DMA2 Stream5 interrupt | 0x0000 0150 |
| dma2_it6 | 76 | 69 | DMA2_STR6 | DMA2 Stream6 interrupt | 0x0000 0154 |
| dma2_it7 | 77 | 70 | DMA2_STR7 | DMA2 Stream7 interrupt | 0x0000 0158 |
| usart6_gbl_it | 78 | 71 | USART6 | USART6 global interrupt | 0x0000 015C |
| exti_usart6_wkup | USART6 wakeup interrupt |
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| 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 | OTG_HS out global interrupt | 0x0000 0168 |
| usb1_in_it | 82 | 75 | OTG_HS_EP1_IN | OTG_HS in global interrupt | 0x0000 016C |
| exti_usb1_wkup | 83 | 76 | OTG_HS_WKUP | OTG_HS wakeup interrupt | 0x0000 0170 |
| usb1_gbl_it | 84 | 77 | OTG_HS | OTG_HS global interrupt | 0x0000 0174 |
| dcmi_it | 85 | 78 | DCMI | DCMI global interrupt | 0x0000 0178 |
| cryp_it | 86 | 79 | CRYP | CRYP global interrupt | 0x0000 017C |
| hash_rng_it | 87 | 80 | HASH_RNG | HASH and RNG global interrupt | 0x0000 0180 |
| cpu_fpu_it | 88 | 81 | FPU | CPU FPU | 0x0000 0184 |
| 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_ER | LCD-TFT error interrupt | 0x0000 01A4 |
| dma2d_gbl_it | 97 | 90 | DMA2D | DMA2D global interrupt | 0x0000 01A8 |
| - | 98 | 91 | SAI2 | SAI2 global interrupt | 0x0000 01AC |
| quadspi_it | 99 | 92 | QUADSPI | QuadSPI global interrupt | 0x0000 01B0 |
| lptim1_it | 100 | 93 | LPTIM1 | LPTIM1 global interrupt | 0x0000 01B4 |
| exti_lptim_wkup | |||||
| cec_it | 101 | 94 | CEC | HDMI-CEC global interrupt | 0x0000 01B8 |
| exti_cec_it | |||||
| i2c4_ev_it | 102 | 95 | I2C4_EV | I2C4 event interrupt | 0x0000 01BC |
| exti_i2c4_ev_it |
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| i2c4_err_it | 103 | 96 | I2C4_ER | I2C4 error interrupt | 0x0000 01C0 |
| spdifrx_it | 104 | 97 | SPDIF | SPDIFRX global interrupt | 0x0000 01C4 |
| usb2_out_it | 105 | 98 | OTG_FS_EP1_OUT | OTG_FS out global interrupt | 0x0000 01C8 |
| usb2_in_it | 106 | 99 | OTG_FS_EP1_IN | OTG_FS in global interrupt | 0x0000 01CC |
| exti_usb2_wkup | 107 | 100 | OTG_FS_WKUP | OTG_FS wakeup | 0x0000 01D0 |
| usb2_gbl_it | 108 | 101 | OTG_FS | OTG_FS global interrupt | 0x0000 01D4 |
| dmamux1_ovr_it | 109 | 102 | DMAMUX1_OV | DMAMUX1 overrun interrupt | 0x0000 01D8 |
| hrtim1_mst_it | 110 | 103 | HRTIM1_MST | HRTIM1 master timer interrupt | 0x0000 01DC |
| hrtim1_tima_it | 111 | 104 | HRTIM1_TIMA | HRTIM1 timer A interrupt | 0x0000 01E0 |
| hrtim1_timb_it | 112 | 105 | HRTIM_TIMB | HRTIM1 timer B interrupt | 0x0000 01E4 |
| hrtim1_timc_it | 113 | 106 | HRTIM1_TIMC | HRTIM1 timer C interrupt | 0x0000 01E8 |
| hrtim1_timd_it | 114 | 107 | HRTIM1_TIMD | HRTIM1 timer D interrupt | 0x0000 01EC |
| hrtim1_time_it | 115 | 108 | HRTIM_TIME | HRTIM1 timer E interrupt | 0x0000 01F0 |
| hrtim1_fault_it | 116 | 109 | HRTIM1_FLT | HRTIM1 fault interrupt | 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 |
| sai3_gbl_it | 121 | 114 | SAI3 | SAI3 global interrupt | 0x0000 0208 |
| swpmi_gbl_it | 122 | 115 | SWPMI1 | SWPMI global interrupt | 0x0000 020C |
| exti_swpmi_wup | SWPMI wakeup | ||||
| 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 | 0x0000 021C |
| mdios_it | 127 | 120 | MDIOS | MDIOS global interrupt | 0x0000 0220 |
| jpeg_it | 128 | 121 | JPEG | JPEG global interrupt | 0x0000 0224 |
| mdma_it | 129 | 122 | MDMA | MDMA | 0x0000 0228 |
| - | 130 | - | - | - | 0x0000 022C |
| sdmmc2_it | 131 | 124 | SDMMC2 | SDMMC global interrupt | 0x0000 0230 |
| hsem1_it | 132 | 125 | HSEM0 | HSEM global interrupt 1 | 0x0000 0234 |
| - | 133 | - | - | - | 0x0000 0238 |
| adc3_it | 134 | 127 | ADC3 | ADC3 global interrupt | 0x0000 023C |
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| 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 | |||||
| lptim2_it | 145 | 138 | LPTIM2 | LPTIM2 timer interrupt | 0x0000 0268 |
| exti_lptim2_wkup | |||||
| lptim3_it | 146 | 139 | LPTIM3 | LPTIM2 timer interrupt | 0x0000 026C |
| exti_lptim3_wkup | |||||
| lptim4_it | 147 | 140 | LPTIM4 | LPTIM2 timer interrupt | 0x0000 0270 |
| exti_lptim4_wkup | |||||
| lptim5_it | 148 | 141 | LPTIM5 | LPTIM2 timer interrupt | 0x0000 0274 |
| exti_lptim5_wkup | |||||
| lpuart_gbl_it | 149 | 142 | LPUART | LPUART global interrupt | 0x0000 0278 |
| exti_lpuart_rx_it | |||||
| exti_lpuart_tx_it | |||||
| exti_d1_wwdg1_wkup | 150 | 143 | WWDG1_RST | Window Watchdog interrupt | 0x0000 027C |
| crs_it | 151 | 144 | CRS | Clock Recovery System global interrupt | 0x0000 0280 |
| ramecc1_it | 152 | 145 | RAMECC1 | ECC diagnostic global interrupt for RAMECC D1 | 0x0000 0284 |
| ramecc2_it | RAMECC2 | ECC diagnostic global interrupt for RAMECC D2 | |||
| ramecc2_it | RAMECC3 | ECC diagnostic global interrupt for RAMECC D3 | |||
| - | 153 | 146 | SAI4 | SAI4 global interrupt | 0x0000 0288 |
| - | 154 | 147 | - | - | 0x0000 028C |
| - | 155 | 148 | - | - | 0x0000 0290 |
| Signal | Priority | NVIC position | Acronym | Description | Address offset |
|---|---|---|---|---|---|
| exti_wkup1_wkup | 156 | 149 | WKUP | WKUP0 to WKUP5 pins | 0x0000 0294 |
| exti_wkup2_wkup | |||||
| exti_wkup3_wkup | |||||
| exti_wkup4_wkup | |||||
| exti_wkup5_wkup | |||||
| exti_wkup6_wkup |
- 1. When different signals are connected to the same NVIC interrupt line, they are OR-ed.