15. Nested vectored interrupt controller (NVIC)

15.1 NVIC main features

The CPU1 NVIC features:

The CPU2 NVIC features:

The NVICs and the processor cores interfaces are closely coupled, resulting in 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 STM32 Cortex ® -M4 MCUs and MPUs programming manual (PM0214) for Cortex ® -M4, and Cortex ® -M0+ programming manual for STM32L0, STM32G0, STM32WL and STM32WB Series (PM0223) for Cortex ® -M0+.

15.2 NVIC implementation

Table 71. NVIC implementation

FeatureSTM32WB55xxSTM32WB35xx
SPI2 interruptX-
TSC interruptX-
LCD interruptX-
LCD wake-upX-

15.3 Interrupt block diagram

The different peripheral interrupts are connected in different ways, depending on the sharing between the two CPUs. To prevent a peripheral or EXTI interrupt to trigger both CPUs, they can be masked either in the NVIC, or, for the NVIC vector sharing multiple peripheral interrupts, by a pre-mask in the SYSCFG registers, see Section 11: System configuration controller (SYSCFG) .

The interrupt block diagram is shown in Figure 40 .

Figure 40. Interrupt block diagram

Interrupt block diagram showing connections between peripheral interrupts, SYSCFG, CPU1, and CPU2.

The diagram illustrates the interrupt architecture for a dual-core system. On the left, there are several interrupt sources: five 'Peripheral interrupt' blocks, one 'EXTI interrupt' block, and a 'SYSCFG' block. The 'SYSCFG' block contains two sub-registers, 'C1IMRn' and 'C2IMRn'. On the right, there are two processing units, 'CPU1' and 'CPU2'. Each unit contains its own 'NVIC' (Nested Vectored Interrupt Controller). The 'EXTI interrupt' and the first three 'Peripheral interrupt' blocks are connected to the 'SYSCFG' block. The 'SYSCFG' block is then connected to the 'NVIC' of both 'CPU1' and 'CPU2'. The remaining two 'Peripheral interrupt' blocks are connected directly to the 'NVIC' of 'CPU1'. All five 'Peripheral interrupt' blocks and the 'EXTI interrupt' block are also connected directly to the 'NVIC' of 'CPU2'. A small identifier 'MS45410V2' is located in the bottom right corner of the diagram.

Interrupt block diagram showing connections between peripheral interrupts, SYSCFG, CPU1, and CPU2.

15.4 Interrupt and exception vectors

Each of the CPU1 and CPU2 has its own vector table, see, respectively, Table 72 and Table 73 , where shaded cells indicate the processor exceptions.

Table 72. CPU1 vector table

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000 0000
--3FixedResetReset0x0000 0004
--2FixedNMINon maskable interrupt HSE CSS, Flash ECC, and SRAM2 parity0x0000 0008
--1FixedHardFaultAll classes of fault0x0000 000C
-0SettableMemManagerMemory manager0x0000 0010
-1SettableBusFaultPre-fetch fault, memory access fault0x0000 0014
-2SettableUsageFaultUndefined instruction or illegal state0x0000 0018
----Reserved0x0000 001C
0x0000 0028
-3SettableSVCallSystem service call via SWI instruction0x0000 002C
-4SettableDebugDebug monitor0x0000 0030
----Reserved0x0000 0034
-5SettablePendSVPendable request for system service0x0000 0038
-6SettableSystickSystem tick timer0x0000 003C
07SettableWWDGWindow watchdog early wake-up0x0000 0040
18SettablePVD, PWM1, PWM3PVD through EXTI[16] (C1IMR2[20])
PWM1 through EXTI[31] (C1IMR2[16])
PWM3 through EXTI[33] (C1IMR2[18])
0x0000 0044
29SettableTAMP, RTC_STAMP, LSE_CSSTamper, TimeStamp, LSECSS interrupt through EXTI[18]0x0000 0048
310SettableRTC_WKUPRTC wake-up interrupt through EXTI[19]0x0000 004C
411SettableFlashFlash memory global interrupt and Flash memory ECC single error interrupt0x0000 0050
512SettableRCCRCC global interrupt0x0000 0054
613SettableEXTI0EXTI line 0 interrupt through EXTI[0]0x0000 0058
714SettableEXTI1EXTI line 1 interrupt through EXTI[1]0x0000 005C
815SettableEXTI2EXTI line 2 interrupt through EXTI[2]0x0000 0060
916SettableEXTI3EXTI line 3 interrupt through EXTI[3]0x0000 0064
1017SettableEXTI4EXTI line 4 interrupt through EXTI[4]0x0000 0068
1118SettableDMA1_CH1DMA1 channel 1 interrupt0x0000 006C
1219SettableDMA1_CH2DMA1 channel 2 interrupt0x0000 0070
1320SettableDMA1_CH3DMA1 channel 3 interrupt0x0000 0074
1421SettableDMA1_CH4DMA1 channel 4 interrupt0x0000 0078
1522SettableDMA1_CH5DMA1 channel 5 interrupt0x0000 007C

Table 72. CPU1 vector table (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
1623SettableDMA1_CH6DMA1 channel 6 interrupt0x0000 0080
1724SettableDMA1_CH7DMA1 channel 7 interrupt0x0000 0084
1825SettableADC1ADC1 global interrupt0x0000 0088
1926SettableUSB_HPUSB high priority interrupt0x0000 008C
2027SettableUSB_LPUSB low priority interrupt (including USB wake-up)0x0000 0090
2128SettableC2SEV
PWR_C2H
CPU2 SEV through EXTI[40]
PWR CPU2 HOLD wake-up interrupt
0x0000 0094
2229SettableCOMPCOMP2 and COMP1 interrupt through EXTI[21:20]0x0000 0098
2330SettableEXTI[9:5]EXTI line [9:5] interrupt through EXTI[9:5]
(C1IMR1[25:21])
0x0000 009C
2431SettableTIM1_BRKTimer 1 break interrupt0x0000 00A0
2532SettableTIM1_UP
TIM16
Timer 1 update (C1IMR1[13])
Timer 16 global interrupt (C1IMR1[14])
0x0000 00A4
2633SettableTIM1_TRG_COM
TIM17
Timer 1 trigger and communication (C1IMR1[13])
Timer 17 global interrupt (C1IMR1[15])
0x0000 00A8
2734SettableTIM1_CCTimer 1 capture compare interrupt0x0000 00AC
2835SettableTIM2Timer 2 global interrupt0x0000 00B0
2936SettablePKAPrivate key accelerator interrupt0x0000 00B4
3037SettableI2C1_EVI2C1 event interrupt0x0000 00B8
3138SettableI2C1_ERI2C1 error interrupt0x0000 00BC
3239SettableI2C3_EVI2C3 event interrupt0x0000 00C0
3340SettableI2C3_ERI2C3 error interrupt0x0000 00C4
3441SettableSPI1SPI 1 global interrupt0x0000 00C8
3542SettableSPI2SPI 2 global interrupt0x0000 00CC
3643SettableUSART1USART1 global interrupt0x0000 00D0
3744SettableLPUART1LPUART1 global interrupt0x0000 00D4
3845SettableSAI1SAI1 A and B global interrupt0x0000 00D8
3946SettableTSCTSC global interrupt0x0000 00DC
4047SettableEXTI[15:10]EXTI line [15:10] interrupt through EXTI[15:10]
(C1IMR1[31:26])
0x0000 00E0
4148SettableRTC_ALARMRTC alarms (A and B) interrupt through EXTI[17]0x0000 00E4
4249SettableCRS_ITCRS interrupt0x0000 00E8

Table 72. CPU1 vector table (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
4350SettablePWR_SOTF
PWR_BLEACT
PWR_802ACT
PWR_RFPHASE
PWR switching on the fly interrupt
PWR end of BLE activity interrupt
PWR end of 802.15.4 activity interrupt
PWR end of critical radio phase interrupt
0x0000 00EC
4451SettableIPCC_C1_RX_ITIPCC CPU1 RX occupied interrupt0x0000 00F0
4552SettableIPCC_C1_TX_ITIPCC CPU1 TX free interrupt0x0000 00F4
4653SettableHSEMSemaphore interrupt 0 to CPU10x0000 00F8
4754SettableLPTIM1LPtimer 1 global interrupt0x0000 00FC
4855SettableLPTIM2LPtimer 2 global interrupt0x0000 0100
4956SettableLCDLCD global interrupt0x0000 0104
5057SettableQUADSPIQUADSPI global interrupt0x0000 0108
5158SettableAES1AES1 global interrupt0x0000 010C
5259SettableAES2AES2 global interrupt0x0000 0110
5360SettableTrue RNGTrue random number generator interrupt0x0000 0114
5461SettableFPUFloating point unit interrupt0x0000 0118
5562SettableDMA2_CH1DMA2_channel 1 interrupt0x0000 011C
5663SettableDMA2_CH2DMA2_channel 2 interrupt0x0000 0120
5764SettableDMA2_CH3DMA2_channel 3 interrupt0x0000 0124
5865SettableDMA2_CH4DMA2_channel 4 interrupt0x0000 0128
5966SettableDMA2_CH5DMA2_channel 5 interrupt0x0000 012C
6067SettableDMA2_CH6DMA2_channel 6 interrupt0x0000 0130
6168SettableDMA2_CH7DMA2_channel 7 interrupt0x0000 0134
6269SettableDMAMUX1_OVRDMAMUX1 overrun interrupt0x0000 0138

Table 73. CPU2 vector table

PositionPriorityType of priorityAcronymDescriptionAddress
----Reserved0x0000 0000
--3FixedResetReset0x0000 0004
-14-2FixedNMINon maskable interrupt HSE CSS, Flash ECC, and SRAM2 parity0x0000 0008
-13-1FixedHardFaultAll classes of fault0x0000 000C
----Reserved0x0000 0010
0x0000 0028
-50SettableSVCallSystem service call via SWI instruction0x0000 002C
----Reserved0x0000 0030
0x0000 0034
-21SettablePendSVPendable request for system service0x0000 0038
-12SettableSystickSystem tick timer0x0000 003C
03Settable-Reserved0x0000 0040
14SettablePVD, PWM1, PWM3PVD through EXTI[16] (C2IMR2[20])
PWM1 through EXTI[31] (C2IMR2[16])
PWM3 through EXTI[33] (C2IMR2[18])
0x0000 0044
25SettableRTC_WKUP, TAMP,
RTC_STAMP
LSE_CSS,
RTC_ALARM
RTC wake-up interrupt through EXTI[19] (C2IMR1[3])
Tamper, TimeStamp
LSECSS interrupt through EXTI[18] (C2IMR1[0])
RTC alarms (A and B) interrupt through EXTI[17] (C2IMR1[4])
0x0000 0048
36SettableUSB_HP, USB_LP
CRS_IT
USB high priority interrupt, USB low priority interrupt (including USB wake-up)
CRS interrupt
0x0000 004C
47SettableRCC
FLASH
C1SEV
RCC global interrupt (C2IMR1[5])
Flash memory global interrupt and Flash memory ECC single error interrupt (C2IMR1[6])
CPU1 SEV through EXTI[41]
0x0000 0050
58SettableEXTI[1:0]EXTI line 1:0 interrupt through EXTI[1:0] (C2IMR1[17:16])0x0000 0054
69SettableEXTI[3:2]EXTI line 3:2 interrupt through EXTI[3:2] (C2IMR1[19:18])0x0000 0058
710SettableEXTI[15:4]EXTI line 15:4 interrupt through EXTI[15:4] (C2IMR1[31:20])0x0000 005C
811SettableTSC
802_IT0
TSC global interrupt (C2IMR2[21])
802.15.4 interrupt 0
0x0000 0060
912SettableDMA1_CH[3:1]DMA1 channel 3:1 interrupt (C2IMR2[2:0])0x0000 0064
1013SettableDMA1_CH[7:4]DMA1 channel 7:4 interrupt (C2IMR2[6:3])0x0000 0068

Table 73. CPU2 vector table (continued)

PositionPriorityType of priorityAcronymDescriptionAddress
1114SettableDMA2_CH[7:1]
DMAMUX1_OVR
DMA2 channel 7:1 interrupt (C2IMR2[14:8])
DMAMUX1 overrun interrupt (C2IMR2[15])
0x0000 006C
1215SettableADC1
COMP
ADC1 global interrupt (C2IMR1[12])
COMP1 and COMP2 interrupt through EXTI[21:20]
(C2IMR1[11])
0x0000 0070
1316SettableLPTIM1LP timer 1 global interrupt0x0000 0074
1417SettableLPTIM2LP timer 2 global interrupt0x0000 0078
1518SettableTIM1_BRK,
TIM1_UP,
TIM1_TRG_COM,
TIM1_CC
Timer 1 break, update, trigger and communication,
capture compare interrupt
0x0000 007C
1619SettableTIM2Timer 2 global interrupt0x0000 0080
1720SettableTIM16Timer 16 global interrupt0x0000 0084
1821SettableTIM17Timer 17 global interrupt0x0000 0088
1922SettableIPCC_C2_RX_IT
IPCC_C2_TX_IT
HSEM
IPCC CPU2 RX occupied interrupt
IPCC CPU2 TX free interrupt
Semaphore interrupt 1 o CPU2
0x0000 008C
2023SettablePKA
True RNG
AES1
Private key accelerator interrupt (C2IMR1[8])
True random number generator interrupt (C2IMR1[9])
AES1 global interrupt (C2IMR1[10])
0x0000 0090
2124SettableAES2AES2 global interrupt0x0000 0094
2225SettableLCD
802_IT1
LCD global interrupt (C2IMR2[22])
802.15.4 interrupt 1
0x0000 0098
2326SettableI2C1_EV
I2C1_ER
I2C1 event interrupt
I2C1 error interrupt
0x0000 009C
2427SettableI2C3_EV
I2C3_ERV
I2C3 event interrupt
I2C3 error interrupt
0x0000 00A0
2528SettableSPI1SPI1 global interrupt0x0000 00A4
2629SettableSPI2SPI2 global interrupt0x0000 00A8
2730SettableUSART1USART1 global interrupt0x0000 00AC
2831SettableLPUART1LPUART global interrupt0x0000 00B0
2932SettableSAI1SAI1 A and B global interrupt0x0000 00B4
3033SettableBLE_BLUE_IT
BLE_RFC_IT
BLE_RFFMS_IT
BLE_HOST_WKUP
BLE blue controller interrupt
BLE radio control interrupt
BLE radio states interrupt
BLE host wake-up interrupt
0x0000 00B8
3134Settable802_IT2
802_HOST_WKUP
802.15.4 interrupt 2
802.15.4 host wake-up interrupt
0x0000 00BC

15.5 Interrupt list

The device wake-up sources are listed in Table 74 . Depending on its origin, the wake-up is handled according to different types, see Section 16.5: EXTI functional behavior for more information.

Some wake-up sources are able to generate an event to the CPUs. see Event column.

The wake-up source capability to wake up CPU1 and or CPU2 is listed in Wake-up column.

For CPUs interrupt handling see Section 15: Nested vectored interrupt controller (NVIC) .

For wake-up handling see Section 16: Extended interrupt and event controller (EXTI) .

Table 74. Wake-up interrupt table

EXTI no.AcronymDescriptionEXTI typeEventWake-up
0EXTI[0]EXTI line 0 from SYSCFGConfigurable AYesCPU1 and CPU2
1EXTI[1]EXTI line 1 from SYSCFGConfigurable AYesCPU1 and CPU2
2EXTI[2]EXTI line 2 from SYSCFGConfigurable AYesCPU1 and CPU2
3EXTI[3]EXTI line 3 from SYSCFGConfigurable AYesCPU1 and CPU2
4EXTI[4]EXTI line 4 from SYSCFGConfigurable AYesCPU1 and CPU2
5EXTI[5]EXTI line 5 from SYSCFGConfigurable AYesCPU1 and CPU2
6EXTI[6]EXTI line 6 from SYSCFGConfigurable AYesCPU1 and CPU2
7EXTI[7]EXTI line 7 from SYSCFGConfigurable AYesCPU1 and CPU2
8EXTI[8]EXTI line 8 from SYSCFGConfigurable AYesCPU1 and CPU2
9EXTI[8]EXTI line 9 from SYSCFGConfigurable AYesCPU1 and CPU2
10EXTI[10]EXTI line 10 from SYSCFGConfigurable AYesCPU1 and CPU2
11EXTI[11]EXTI line 11 from SYSCFGConfigurable AYesCPU1 and CPU2
12EXTI[12]EXTI line 12 from SYSCFGConfigurable AYesCPU1 and CPU2
13EXTI[13]EXTI line 13 from SYSCFGConfigurable AYesCPU1 and CPU2
14EXTI[14]EXTI line 14 from SYSCFGConfigurable AYesCPU1 and CPU2
15EXTI[15]EXTI line 15 from SYSCFGConfigurable AYesCPU1 and CPU2
16PVDPVD lineConfigurable ANoCPU1 and CPU2
17RTC_ALARMRTC alarms (A and B) interruptConfigurable AYesCPU1 and CPU2
18TAMP, RTC_STAMP,
LSE_CSS
RTC Tamper interrupt
RTC TimeStamp interrupt
RCC LSECSS interrupt
Configurable AYesCPU1 and CPU2
19RTC_WKUPRTC wake-up interruptConfigurable AYesCPU1 and CPU2
20COMP1COMP1 lineConfigurable AYesCPU1 and CPU2
21COMP2COMP2 lineConfigurable AYesCPU1 and CPU2
22I2C1 wake-upI2C1 wake-upDirect BNoCPU1 and CPU2
23I2C3 wake-upI2C3 wake-upDirect BNoCPU1 and CPU2

Table 74. Wake-up interrupt table (continued)

EXTI no.AcronymDescriptionEXTI typeEventWake-up
24USART1USART1 wake-upDirect BNoCPU1 and CPU2
25LPUART1LPUART1 wake-upDirect BNoCPU1 and CPU2
26Reserved----
27Reserved----
28USB wake-upUSB wake-upDirect BNoCPU1 and CPU2
29LPTIM1 wake-upLP timer 1 wake-upDirect BNoCPU1 and CPU2
30LPTIM2 wake-upLP timer 2 wake-upDirect BNoCPU1 and CPU2
31PVM1PVM1 lineConfigurable ANoCPU1 and CPU2
32Reserved----
33PVM3PVM3 lineConfigurable ANoCPU1 and CPU2
34Reserved----
35Reserved----
36IPCC CPU1 interruptsIPCC CPU1
RX occupied and TX free interrupts
Direct CNoCPU1 (1)
37IPCC CPU2 interruptsIPCC CPU2
RX occupied and TX free interrupts
Direct CNoCPU2 (2)
38HSEM interrupt 0Semaphore interrupt 0 for CPU1Direct CNoCPU1 (1)
39HSEM interrupt 1Semaphore interrupt 1 for CPU2Direct CNoCPU2 (2)
40C2SEVCPU2 SEV lineConfigurable AYesCPU1 (3)
41C1SEVCPU1 SEV lineConfigurable AYesCPU2 (4)
42Flash interruptFlash ECC and global interruptsDirect CNoCPU1 and CPU2
43LCD wake-upLCD wake-upDirect BNoCPU1 and CPU2
44HSE CSS interruptRCC HSE CSS interruptDirect CNoCPU1 and CPU2
45BLE interruptsBLE, RADIO, & RF_FSM interruptsDirect BNoCPU2 (2)
46802 interrupts802.15.4 Int0 and Int1 interruptsDirect BNoCPU2 (2)
47Reserved----
48CDBGPWRUPREQDebug power up request wake-upDirectNoCPU1 and CPU2

1. For correct operation the EXTI direct event C2IMRx.IMn bit must be set to 0 before CPU1 uses this direct event.

2. For correct operation the EXTI direct event C1IMRx.IMn bit must be set to 0 before CPU2 uses this direct event.

3. For correct operation the EXTI configurable event both C2IMRx.IMn and C2EMRx.EMn bits must be set to 0 before CPU1 uses this configurable event.

4. For correct operation the EXTI configurable event both C1IMRx.IMn and C1EMRx.EMn bits must be set to 0 before CPU2 uses this configurable event.