19. Extended interrupts and event controller (EXTI)

The extended interrupts and event controller (EXTI) manages the individual CPU and system wake-up through configurable event inputs. It provides wake-up requests to the power control, and generates an interrupt request to the CPU NVIC and events to the CPU event input. For the CPU, an additional event generation block (EVG) is needed to generate the CPU event signal.

The EXTI wake-up requests allow the system to be woken up from Stop modes.

The interrupt request and event request generation can be used also in Run modes.

The EXTI also includes the EXTI mux IO port selection.

19.1 EXTI main features

The configurable events have the following features:

19.2 EXTI block diagram

The EXTI consists of a register block accessed via an AHB interface, the event input trigger block, the masking block and EXTI mux, as shown in Figure 67 :

Figure 67. EXTI block diagram

Figure 67. EXTI block diagram. The diagram shows the internal architecture of the EXTI block. On the left, 'GPIO' and 'Peripherals' are connected to the 'EXTI' block. 'GPIO' connects via 'IOPort' to an 'EXTI mux'. 'Peripherals' connect via 'Wake-up' and 'Configurable event(y)' to an 'Event trigger'. The 'EXTI' block contains 'Registers', 'EXTI mux', 'Event trigger', and 'Masking' components. The 'Registers' are connected to an 'AHB interface' (with 'hclk' input) and output 'exti_ilac' and 'exti[15:0]' (the latter 'To interconnect'). The 'Event trigger' outputs 'events' to the 'Masking' block. The 'Masking' block outputs 'sys_wake-up', 'c_wake-up', 'it_exti_per(y)', 'c_evt_exti', and 'c_evt_rst'. 'sys_wake-up' and 'c_wake-up' go to 'PWR'. 'it_exti_per(y)' goes to 'CPU' (via 'rxev' and 'nvic(x)'). 'c_evt_exti' and 'c_evt_rst' go to an 'EVG' block. The 'EVG' block contains a 'Pulse' component and outputs 'c_event' to 'CPU' and 'c_fclk' back to the 'Pulse' component. 'CPU' also provides 'c_fclk' to the 'EVG' block. A reference code 'MSV62642V1' is in the bottom right.
Figure 67. EXTI block diagram. The diagram shows the internal architecture of the EXTI block. On the left, 'GPIO' and 'Peripherals' are connected to the 'EXTI' block. 'GPIO' connects via 'IOPort' to an 'EXTI mux'. 'Peripherals' connect via 'Wake-up' and 'Configurable event(y)' to an 'Event trigger'. The 'EXTI' block contains 'Registers', 'EXTI mux', 'Event trigger', and 'Masking' components. The 'Registers' are connected to an 'AHB interface' (with 'hclk' input) and output 'exti_ilac' and 'exti[15:0]' (the latter 'To interconnect'). The 'Event trigger' outputs 'events' to the 'Masking' block. The 'Masking' block outputs 'sys_wake-up', 'c_wake-up', 'it_exti_per(y)', 'c_evt_exti', and 'c_evt_rst'. 'sys_wake-up' and 'c_wake-up' go to 'PWR'. 'it_exti_per(y)' goes to 'CPU' (via 'rxev' and 'nvic(x)'). 'c_evt_exti' and 'c_evt_rst' go to an 'EVG' block. The 'EVG' block contains a 'Pulse' component and outputs 'c_event' to 'CPU' and 'c_fclk' back to the 'Pulse' component. 'CPU' also provides 'c_fclk' to the 'EVG' block. A reference code 'MSV62642V1' is in the bottom right.

Table 136. EXTI pin overview

Pin nameI/ODescription
AHB interfaceI/OEXTI register bus interface. When one event is configured to enable security, the AHB interface supports secure accesses.
hclkIAHB bus clock and EXTI system clock
Configurable event(y)IAsynchronous wake-up events from peripherals that do not have an associated interrupt and flag in the peripheral
exti_ilacOIllegal access event
IOPort(n)IGPIOs block IO ports[15:0]
exti[15:0]OEXTI GPIO output port to trigger other peripherals
it_exti_per (y)OInterrupts to the CPU associated with configurable event (y)
c_evt_extiOHigh-level sensitive event output for CPU, synchronous to hclk
c_evt_rstIAsynchronous reset input to clear c_evt_exti
sys_wakeupOAsynchronous system wake-up request to PWR for ck_sys and hclk
c_wakeupOWake-up request to PWR for CPU, synchronous to hclk

Table 137. EVG pin overview

Pin nameI/ODescription
c_fclkICPU free running clock
c_evt_inIHigh-level sensitive events input from EXTI, asynchronous to CPU clock
c_eventOEvent pulse, synchronous to CPU clock
c_evt_rstOEvent reset signal, synchronous to CPU clock

19.2.1 EXTI connections between peripherals and CPU

Some peripherals able to generate wake-up or interrupt events when the system is in Stop mode are connected to the EXTI.

The EXTI configurable event interrupts are connected to the NVIC.

The dedicated EXTI/EVG CPU event is connected to the CPU rxeiv input.

The EXTI CPU wake-up signals are connected to the PWR and are used to wake up the system and the CPU sub-system bus clocks.

19.2.2 EXTI interrupt/event mapping

The EXTI lines are connected as shown in Table 138 .

Table 138. EXTI line connections

EXTI lineLine sourceLine type
0-15 (1)GPIOConfigurable
16PVD outputConfigurable
17COMP1 output (2)Configurable
18COMP2 output (2)Configurable

1. EXTI lines 11 and 10 are available only on STM32WBA52/54/55xx devices.

2. Available only on STM32WBA54/55xx devices.

19.3 EXTI functional description

The events features are controlled from register bits as follows:

19.3.1 EXTI configurable event input wake-up

Figure 68 is a detailed representation of the logic associated with configurable event inputs that wake up the CPU sub-system bus clocks and generate an EXTI pending flag and interrupt to the CPU, and/or a CPU wake-up event.

Figure 68. Configurable event trigger logic CPU wake-up

Figure 68: Configurable event trigger logic CPU wake-up. This block diagram illustrates the internal logic of the EXTI peripheral. On the left, 'Configurable event input(y)' lines enter an 'Asynchronous edge detection circuit' which is controlled by 'Falling trigger selection register', 'Rising trigger selection register', and 'Software interrupt event register' from the 'Peripheral interface'. The circuit's output goes through a 'Delay' block and a 'Rising edge detect pulse generator' (driven by 'hclk'). This signal is ANDed with outputs from 'CPU event mask register' and 'CPU interrupt mask register'. The result is an 'Other CPU events(x,y)' signal. A 'Pending request register' is also connected to the 'Peripheral interface' and receives inputs from the 'Asynchronous edge detection circuit' and the 'Rising edge detect pulse generator'. The 'Pending request register' outputs 'it_exti_per(y)'. The 'Other CPU events(x,y)' signal is ORed with 'CPU event(y)' to produce 'c_evt_rst', which is then processed by an 'EVG' (Event Generator) block containing a 'CPU rising edge detect pulse generator' (driven by 'ck_fclk_c') to produce 'c_event'. The 'Other CPU events(x,y)' signal is also ORed with 'Other CPU wake-ups' to produce 'c_wake-up', which is then processed by a 'Sync' block (driven by 'hclk') to produce 'sys_wake-up'. The 'Peripheral interface' is connected to an 'AHB interface' and 'hclk'.
Figure 68: Configurable event trigger logic CPU wake-up. This block diagram illustrates the internal logic of the EXTI peripheral. On the left, 'Configurable event input(y)' lines enter an 'Asynchronous edge detection circuit' which is controlled by 'Falling trigger selection register', 'Rising trigger selection register', and 'Software interrupt event register' from the 'Peripheral interface'. The circuit's output goes through a 'Delay' block and a 'Rising edge detect pulse generator' (driven by 'hclk'). This signal is ANDed with outputs from 'CPU event mask register' and 'CPU interrupt mask register'. The result is an 'Other CPU events(x,y)' signal. A 'Pending request register' is also connected to the 'Peripheral interface' and receives inputs from the 'Asynchronous edge detection circuit' and the 'Rising edge detect pulse generator'. The 'Pending request register' outputs 'it_exti_per(y)'. The 'Other CPU events(x,y)' signal is ORed with 'CPU event(y)' to produce 'c_evt_rst', which is then processed by an 'EVG' (Event Generator) block containing a 'CPU rising edge detect pulse generator' (driven by 'ck_fclk_c') to produce 'c_event'. The 'Other CPU events(x,y)' signal is also ORed with 'Other CPU wake-ups' to produce 'c_wake-up', which is then processed by a 'Sync' block (driven by 'hclk') to produce 'sys_wake-up'. The 'Peripheral interface' is connected to an 'AHB interface' and 'hclk'.
  1. 1. Only for the input events that support CPU rxeu generation c_event.

The software interrupt event register allows configurable events to be triggered by software, writing the corresponding register bit, whatever the edge selection setting.

The configurable event active trigger edge (or both edges) is selected and enabled in the rising/falling edge selection registers.

The CPU has its dedicated wake-up (interrupt) mask register and dedicated event mask registers. When the event is enabled, it is generated to the CPU. All events for the CPU are ordered together into a single CPU event signal. The event pending registers (EXTI_RPR and EXTI_FPR) are not set for an unmasked CPU event.

The configurable events have unique interrupt pending request registers. The pending register is only set for an unmasked interrupt. Each configurable event provides a common interrupt to the CPU. The configurable event interrupts must be acknowledged by software in the EXTI_RPR and/or EXTI_FPR registers.

When a CPU wake-up (interrupt) or CPU event is enabled, the asynchronous edge detection circuit is reset by the clocked delay and rising edge detect pulse generator. This guarantees that the EXTI hclk clock is woken up before the asynchronous edge detection circuit is reset.

Note: A detected configurable event interrupt pending request can be cleared by the CPU with the correct access permission. The system is unable to enter into low-power modes as long as an interrupt pending request is active.

19.3.2 EXTI mux selection

The EXTI mux allows the selection of GPIOs as interrupts and wake-up. GPIOs are connected via 16 EXTI mux lines to the first 16 EXTI events as configurable event. The selection of GPIO port as EXTI mux output is controlled in the EXTI external interrupt selection register (EXTI_EXTICR1) .

Figure 69. EXTI mux GPIO selection

Diagram showing EXTI mux GPIO selection for EXTI10, EXTI11, and EXTI115. Each EXTI line has a multiplexer selecting from various GPIO pins (e.g., PA0, PB0, PC0, Px0 for EXTI10).

The diagram illustrates the EXTI multiplexer (MUX) selection for three specific EXTI lines: EXTI10, EXTI11, and EXTI115. Each EXTI line has a corresponding MUX block. For EXTI10, the MUX selects from GPIO pins PA0, PB0, PC0, and Px0. For EXTI11, the MUX selects from GPIO pins PA1, PB1, PC1, and Px1. For EXTI115, the MUX selects from GPIO pins PA15, PB15, PC15, and Px15. The outputs of these MUXes are labeled EXTI10, EXTI11, and EXTI115 respectively. The diagram is labeled MS44726V1 in the bottom right corner.

Diagram showing EXTI mux GPIO selection for EXTI10, EXTI11, and EXTI115. Each EXTI line has a multiplexer selecting from various GPIO pins (e.g., PA0, PB0, PC0, Px0 for EXTI10).

The EXTI mux outputs are available as output signals from the EXTI to trigger other peripherals, whatever the masking in EXTI_IMR and EXTI_EMR registers.

19.4 EXTI functional behavior

The configurable events are enabled by enabling at least one of the trigger edges.

Once an event input is enabled, the CPU wake-up generation is conditioned by the CPU interrupt mask and CPU event mask.

Table 139. Masking functionality

CPU interrupt enable
(in EXTI_IMR.IMn)
CPU event enable
(in EXTI_EMR.EMn)
Configurable event inputs
(in EXTI_RPR.RPIFn and
EXTI_FPR.FPIFn)
EXTI(n)
interrupt
CPU
event
CPU
wake-up
00NoMaskedMaskedMasked
1YesYes
10Status latchedYesMaskedYes
1YesYes

For configurable event inputs, when the enabled edges occur on the event input, an event request is generated. When the associated CPU interrupt is unmasked, the corresponding pending bits EXTI_RPR.RPIFn and/or EXTI_FPR.FPIFn is/are set: the CPU sub-system is woken up and the CPU interrupt signal is activated. The EXTI_RPR.RPIFn and/or EXTI_FPR.FPIFn pending bits must be cleared by software writing it to 1. This action clears the CPU interrupt.

For the configurable event inputs, an event request can be generated by software when writing a 1 in the software interrupt/event register EXTI_SWIER, allowing the generation of a rising edge on the event. When the event is unmasked in EXTI_IMR or EXTI_EMR, the rising edge event pending bit is set in EXTI_RPR, whatever the setting in EXTI_RTSR.

19.5 EXTI event protection

The EXTI is able to protect event register bits from being modified by non-secure and unprivileged accesses. The protection is individually activated per input event via the

register bits in EXTI_SECCFGR and EXTI_PRIVCFGR. At EXTI level, the protection consists in preventing the following unauthorized write access:

Table 140. Register protection overview

Register nameAccess typeProtection (1)(2)
EXTI_RTSRRWSecurity and privilege can be bit-wise enabled in EXTI_SECCFGR and EXTI_PRIVCFGR.
EXTI_FTSRRW
EXTI_SWIERRW
EXTI_RPRRW
EXTI_FPRRW
EXTI_SECCFGRRWAlways secure.
Privilege can be bit-wise enabled in EXTI_PRIVCFGR.
EXTI_PRIVCFGRRWAlways privileged.
Security can be bit-wise enabled in EXTI_SECCFGR.
EXTI_EXTICRnRWSecurity and privilege can be bit-wise enabled in EXTI_SECCFGR and EXTI_PRIVCFGR.
EXTI_LOCKRRWAlways secure
EXTI_IMRWSecurity and privilege can be bit-wise enabled in EXTI_SECCFGR and EXTI_PRIVCFGR.
EXTI_EMRRW
EXTI_HWCFCGRRNon-secure unprivileged
EXTI_VERR
EXTI_IDR
EXTI_SIDR

1. Security is enabled with the individual input event (EXTI_SECCFGR register).

2. Privilege is enabled with the individual Input event (EXTI_PRIVCFGR register).

19.5.1 EXTI security protection

When security is enabled for an input event, the associated input event configuration and control bits can only be modified and read by a secure access. A non-secure write access is discarded and a read returns 0.

When input events are non-secure, the security is disabled. The associated input event configuration and control bits can be modified and read by a secure access and non-secure access.

The security configuration in registers EXTI_SECCFGR can be globally locked after reset by EXTI_LOCKR.LOCK.

19.5.2 EXTI privilege protection

When privilege is enabled for an input event, the associated input event configuration and control bits can only be modified and read by a privileged access. An unprivileged write access is discarded and a read returns 0.

When input events are unprivileged, the privilege is disabled. The associated input event configuration and control bits can be modified and read by a privileged access and unprivileged access.

The privileged configuration in registers EXTI_PRIVCFG can be globally locked after reset by EXTI_LOCKR.LOCK.

19.6 EXTI registers

The EXTI register map is divided in sections, as indicated in Table 141 .

Table 141. EXTI register map sections

Address offsetDescription
0x000 - 0x01CGeneral configurable event [18:0] configuration
0x060 - 0x06CEXTI IO port mux selection
0x070EXTI protection lock configuration
0x080 - 0x0BCCPU input event configuration

All the registers can be accessed with word (32-bit), half-word (16-bit) and byte (8-bit) access.

19.6.1 EXTI rising trigger selection register (EXTI_RTSR1)

Address offset: 0x000

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RT18RT17RT16
rwrwrw
1514131211109876543210
RT15RT14RT13RT12RT11RT10RT9RT8RT7RT6RT5RT4RT3RT2RT1RT0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 RT[18:0] : Rising trigger event configuration bit of configurable event input x (1) (x = 0 to 18)

When EXTI_SECCFGR.SECx is disabled, RTx can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SECx is enabled, RTx can only be accessed with secure access.

Non-secure write to this bit x is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIVx is disabled, RTx can be accessed with unprivileged and privileged access.

When EXTI_PRIVCFGR.PRIVx is enabled, RTx can only be accessed with privileged access. Unprivileged write to this bit x is discarded, unprivileged read returns 0.

0: Rising trigger disabled (for event and interrupt) for input line

1: Rising trigger enabled (for event and interrupt) for input line

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

  1. 1. The configurable event inputs are edge triggered, no glitch must be generated on these inputs.
    If a rising edge on the configurable event input occurs during writing of the register, the associated pending bit is not set. Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

19.6.2 EXTI falling trigger selection register (EXTI_FTSR1)

Address offset: 0x004

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FT18FT17FT16
1514131211109876543210
FT15FT14FT13FT12FT11FT10FT9FT8FT7FT6FT5FT4FT3FT2FT1FT0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 FT[18:0] : Falling trigger event configuration bit of configurable event input x (1) (x = 0 to 18)

When EXTI_SECCFGR.SECx is disabled, FTx can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SECx is enabled, FTx can only be accessed with secure access.

Non-secure write to this FTx is discarded, non-secure read returns 0.

When EXTI_PRIVCFGR.PRIVx is disabled, FTx can be accessed with unprivileged and privileged access.

When EXTI_PRIVCFGR.PRIVx is enabled, FTx can only be accessed with privileged access. Unprivileged write to this FTx is discarded, unprivileged read returns 0.

0: Falling trigger disabled (for event and Interrupt) for input line

1: Falling trigger enabled (for event and Interrupt) for input line.

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

  1. 1. The configurable event inputs are edge triggered, no glitch must be generated on these inputs.
    If a falling edge on the configurable event input occurs during writing of the register, the associated pending bit is not set. Rising and falling edge triggers can be set for the same configurable event input. In this case, both edges generate a trigger.

19.6.3 EXTI software interrupt event register (EXTI_SWIER1)

Address offset: 0x008

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SWI18SWI17SWI16
1514131211109876543210
SWI15SWI14SWI13SWI12SWI11SWI10SWI9SWI8SWI7SWI6SWI5SWI4SWI3SWI2SWI1SWI0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 SWI[18:0] : Software interrupt on event x (x = 0 to 18)

When EXTI_SECFGR.SECx is disabled, SWIx can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SECx is enabled, SWIx can only be accessed with secure access.

Non-secure write to this SWI x is discarded, non-secure read returns 0.

When EXTI_PRIVCFGR.PRIVx is disabled, SWIx can be accessed with unprivileged and privileged access.

When EXTI_PRIVCFGR.PRIVx is enabled, SWIx can only be accessed with privileged access. Unprivileged write to this SWIx is discarded, unprivileged read returns 0.

When unmasked in EXTI_IMR or EXTI_EMR, a software interrupt is generated and EXTI_RPR is set, a software interrupt is generated independently from the setting in EXTI_RTSR and EXTI_FTSR. It always returns 0 when read.

0: Writing 0 has no effect.

1: Writing 1 triggers a rising edge event on event x. This bit is auto cleared by hardware.

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

19.6.4 EXTI rising edge pending register (EXTI_RPR1)

Address offset: 0x00C

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RPIF18RPIF17RPIF16
rc_w1rc_w1rc_w1

1514131211109876543210
RPIF15RPIF14RPIF13RPIF12RPIF11RPIF10RPIF9RPIF8RPIF7RPIF6RPIF5RPIF4RPIF3RPIF2RPIF1RPIF0
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 RPIF[18:0] : configurable event inputs x rising edge pending bit (x = 0 to 18)

When EXTI_SECFGR.SECx is disabled, RPIFx can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SECx is enabled, RPIFx can only be accessed with secure access.

Non-secure write to this RPIFx is discarded, non-secure read returns 0.

When EXTI_PRIVCFGR.PRIVx is disabled, RPIFx can be accessed with unprivileged and privileged access.

When EXTI_PRIVCFGR.PRIVx is enabled, RPIFx can only be accessed with privileged access. Unprivileged write to this RPIFx is discarded, unprivileged read returns 0.

0: No rising edge trigger request occurred

1: Rising edge trigger request occurred

This bit is set when the rising edge event when unmasked in EXTI_IMR or EXTI_EMR and an EXTI_SWIER software trigger arrives on the configurable event line. This bit is cleared by writing 1 to it.

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

19.6.5 EXTI falling edge pending register (EXTI_FPR1)

Address offset: 0x010

Reset value: 0x0000 0000

Contains only register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FPIF18FPIF17FPIF16
1514131211109876543210
FPIF15FPIF14FPIF13FPIF12FPIF11FPIF10FPIF9FPIF8FPIF7FPIF6FPIF5FPIF4FPIF3FPIF2FPIF1FPIF0
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 FPIF[18:0] : configurable event inputs x falling edge pending bit (x =0 to 18)

When EXTI_SECCFGR.SECx is disabled, FPIFx can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SECx is enabled, FPIFx can only be accessed with secure access.

Non-secure write to this FPIFx is discarded, non-secure read returns 0.

When EXTI_PRIVCFGR.PRIVx is disabled, FPIFx can be accessed with unprivileged and privileged access.

When EXTI_PRIVCFGR.PRIVx is enabled, FPIFx can only be accessed with privileged access. Unprivileged write to this FPIFx is discarded, unprivileged read returns 0.

0: No falling edge trigger request occurred

1: Falling edge trigger request occurred

This bit is set when the falling edge event arrives on the configurable event line. This bit is cleared by writing 1 to it.

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

19.6.6 EXTI security configuration register (EXTI_SECCFGR1)

Address offset: 0x014

Reset value: 0x0000 0000

This register provides write access security, a non-secure write access is ignored and causes the generation of an illegal access event. A non-secure read returns the register data.

Contains only register bits for security capable input events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEC18SEC17SEC16
1514131211109876543210
SEC15SEC14SEC13SEC12SEC11SEC10SEC9SEC8SEC7SEC6SEC5SEC4SEC3SEC2SEC1SEC0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 SEC[18:0] : Security enable on event input x (x = 0 to 18)

When EXTI_PRIVCFGR.PRIVx is disabled, SECx can be accessed with privileged and unprivileged access.
When EXTI_PRIVCFGR.PRIVx is enabled, SECx can only be written with privileged access. Unprivileged write to this SECx is discarded.

0: Event security disabled (non-secure)
1: Event security enabled (secure)

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

19.6.7 EXTI privilege configuration register (EXTI_PRIVCFG1)

Address offset: 0x018

Reset value: 0x0000 0000

This register provides privileged write access protection. An unprivileged read returns the register data.

Contains only register bits for security capable input events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PRIV18PRIV17PRIV16
rwrwrw
1514131211109876543210
PRIV15PRIV14PRIV13PRIV12PRIV11PRIV10PRIV9PRIV8PRIV7PRIV6PRIV5PRIV4PRIV3PRIV2PRIV1PRIV0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 PRIV[18:0] : Security enable on event input x (x = 0 to 18)

When EXTI_SECCFGR.SECx is disabled, PRIVx can be accessed with secure and non-secure access.
When EXTI_SECCFGR.SECx is enabled, PRIVx can only be written with secure access. Non-secure write to this PRIVx is discarded.

0: Event privilege disabled (unprivileged)
1: Event privilege enabled (privileged)

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

19.6.8 EXTI external interrupt selection register (EXTI_EXTICR1)

Address offset: 0x060

Reset value: 0x0000 0000

31302928272625242322212019181716
EXTI3[7:0]EXTI2[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
EXTI1[7:0]EXTI0[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:24 EXTI3[7:0] : EXTI3 GPIO port selection

These bits are written by software to select the source input for EXTI3 external interrupt.

When EXTI_SECCFGR.SEC3 is disabled, EXTI3 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC3 is enabled, EXTI3 can only be accessed with secure access.

Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV3 is disabled, EXTI3 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV3 is enabled, EXTI3 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA3 pin

0x01: PB3 pin

0x07: PH3 pin

Others: reserved

Bits 23:16 EXTI2[7:0] : EXTI2 GPIO port selection

These bits are written by software to select the source input for EXTI2 external interrupt.

When EXTI_SECCFGR.SEC2 is disabled, EXTI2 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC2 is enabled, EXTI2 can only be accessed with secure access.

Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV2 is disabled, EXTI2 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV2 is enabled, EXTI2 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA2 pin

0x01: PB2 pin

Others: reserved

Bits 15:8 EXTI1[7:0] : EXTI1 GPIO port selection

These bits are written by software to select the source input for EXTI1 external interrupt.

When EXTI_SECCFGR.SEC1 is disabled, EXTI1 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC1 is enabled, EXTI1 can only be accessed with secure access.

Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV1 is disabled, EXTI1 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV1 is enabled, EXTI1 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA1 pin

0x01: PB1 pin

Others: reserved

Bits 7:0 EXTI0[7:0] : EXTI0 GPIO port selection

These bits are written by software to select the source input for EXTI0 external interrupt.

When EXTI_SECCFGR.SEC0 is disabled, EXTI0 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC0 is enabled, EXTI0 can only be accessed with secure access.

Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV0 is disabled, EXTI0 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV0 is enabled, EXTI0 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA0 pin

0x01: PB0 pin

Others: reserved

19.6.9 EXTI external interrupt selection register (EXTI_EXTICR2)

Address offset: 0x064

Reset value: 0x0000 0000

31302928272625242322212019181716
EXTI7[7:0]EXTI6[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
EXTI5[7:0]EXTI4[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 EXTI7[7:0] : EXTI7 GPIO port selection

These bits are written by software to select the source input for EXTI7 external interrupt.

When EXTI_SECCFGR.SEC7 is disabled, EXTI7 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC7 is enabled, EXTI7 can only be accessed with secure access.

Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV7 is disabled, EXTI7 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV7 is enabled, EXTI7 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA7 pin

0x01: PB7 pin

Others: reserved

Bits 23:16 EXTI6[7:0] : EXTI6 GPIO port selection

These bits are written by software to select the source input for EXTI6 external interrupt.
When EXTI_SECCFGR.SEC6 is disabled, EXTI6 can be accessed with non-secure and secure access.
When EXTI_SECCFGR.SEC6 is enabled, EXTI6 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.
When EXTI_PRIVCFGR.PRIV6 is disabled, EXTI6 can be accessed with privileged and unprivileged access.
When EXTI_PRIVCFGR.PRIV6 is enabled, EXTI6 can only be accessed with privileged access. Unprivileged write to this bit is discarded.
0x00: PA6 pin
0x01: PB6 pin
Others: reserved

Bits 15:8 EXTI5[7:0] : EXTI5 GPIO port selection

These bits are written by software to select the source input for EXTI5 external interrupt.
When EXTI_SECCFGR.SEC5 is disabled, EXTI5 can be accessed with non-secure and secure access.
When EXTI_SECCFGR.SEC5 is enabled, EXTI5 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.
When EXTI_PRIVCFGR.PRIV5 is disabled, EXTI5 can be accessed with privileged and unprivileged access.
When EXTI_PRIVCFGR.PRIV5 is enabled, EXTI5 can only be accessed with privileged access. Unprivileged write to this bit is discarded.
0x00: PA5 pin
0x01: PB5 pin
Others: reserved

Bits 7:0 EXTI4[7:0] : EXTI4 GPIO port selection

These bits are written by software to select the source input for EXTI4 external interrupt.
When EXTI_SECCFGR.SEC4 is disabled, EXTI4 can be accessed with non-secure and secure access.
When EXTI_SECCFGR.SEC4 is enabled, EXTI4 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.
When EXTI_PRIVCFGR.PRIV4 is disabled, EXTI4 can be accessed with privileged and unprivileged access.
When EXTI_PRIVCFGR.PRIV4 is enabled, EXTI4 can only be accessed with privileged access. Unprivileged write to this bit is discarded.
0x00: PA4 pin (no port pin selected on STM32WBA50/52/54xx devices)
0x01: PB4 pin
Others: reserved

19.6.10 EXTI external interrupt selection register (EXTI_EXTICR3)

Address offset: 0x068

Reset value: 0x0000 0000

31302928272625242322212019181716
EXTI11[7:0]EXTI10[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
EXTI9[7:0]EXTI8[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:24 EXTI11[7:0] : EXTI11 GPIO port selection

These bits are written by software to select the source input for EXTI11 external interrupt. When EXTI_SECCFGR.SEC11 is disabled, EXTI11 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC11 is enabled, EXTI11 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV11 is disabled, EXTI11 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV11 is enabled, EXTI11 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA11 pin

0x01: PB11 pin

Others: reserved

Bits 23:16 EXTI10[7:0] : EXTI10 GPIO port selection

These bits are written by software to select the source input for EXTI10 external interrupt.

When EXTI_SECCFGR.SEC10 is disabled, EXTI10 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC10 is enabled, EXTI10 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV10 is disabled, EXTI10 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV10 is enabled, EXTI10 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA10 pin

0x01: PB10 pin (reserved on STM32WBA55xx devices)

Others: reserved

Bits 15:8 EXTI9[7:0] : EXTI9 GPIO port selection

These bits are written by software to select the source input for EXTI9 external interrupt.

When EXTI_SECCFGR.SEC9 is disabled, EXTI9 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC9 is enabled, EXTI9 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV9 is disabled, EXTI9 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV9 is enabled, EXTI9 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA9 pin

0x01: PB9 pin

Others: reserved

Bits 7:0 EXTI8[7:0] : EXTI8 GPIO port selection

These bits are written by software to select the source input for EXTI8 external interrupt.

When EXTI_SECCFGR.SEC8 is disabled, EXTI8 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC8 is enabled, EXTI8 can only be accessed with secure access.

Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV8 is disabled, EXTI8 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV8 is enabled, EXTI8 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA8 pin

0x01: PB8 pin

Others: reserved

19.6.11 EXTI external interrupt selection register (EXTI_EXTICR4)

Address offset: 0x06C

Reset value: 0x0000 0000

31302928272625242322212019181716
EXTI15[7:0]EXTI14[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
EXTI13[7:0]EXTI12[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 EXTI15[7:0] : EXTI15 GPIO port selection

These bits are written by software to select the source input for EXTI15 external interrupt.

When EXTI_SECCFGR.SEC15 is disabled, EXTI15 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC15 is enabled, EXTI15 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV15 is disabled, EXTI15 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV15 is enabled, EXTI15 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA15 pin

0x01: PB15 pin

0x02: PC15 pin

Others: reserved

Bits 23:16 EXTI14[7:0] : EXTI14 GPIO port selection

These bits are written by software to select the source input for EXTI14 external interrupt. When EXTI_SECCFGR.SEC14 is disabled, EXTI14 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC14 is enabled, EXTI14 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV14 is disabled, EXTI14 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV14 is enabled, EXTI14 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA14 pin

0x01: PB14 pin

0x02: PC14 pin

Others: reserved

Bits 15:8 EXTI13[7:0] : EXTI13 GPIO port selection

These bits are written by software to select the source input for EXTI13 external interrupt. When EXTI_SECCFGR.SEC13 is disabled, EXTI13 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC13 is enabled, EXTI13 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV13 is disabled, EXTI13 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV13 is enabled, EXTI13 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA13 pin

0x01: PB13 pin

0x02: PC13 pin

Others: reserved

Bits 7:0 EXTI12[7:0] : EXTI12 GPIO port selection

These bits are written by software to select the source input for EXTI12 external interrupt. When EXTI_SECCFGR.SEC12 is disabled, EXTI12 can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SEC12 is enabled, EXTI12 can only be accessed with secure access. Non-secure write is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIV12 is disabled, EXTI12 can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIV12 is enabled, EXTI12 can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0x00: PA12 pin

0x01: PB12 pin

Others: reserved

19.6.12 EXTI lock register (EXTI_LOCKR)

Address offset: 0x070

Reset value: 0x0000 0000

This register provides write access security: a non-secure write access is ignored and a read access returns zero data, and both generates an illegal access event.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LOCK
rs

Bits 31:1 Reserved, must be kept at reset value.

Bit 0 LOCK : Global security and privilege configuration registers (EXTI_SECCFGR and EXTI_PRIVCFGR) lock

This bit is written once after reset.

0: Security and privilege configuration open, can be modified.

1: Security and privilege configuration locked, can no longer be modified.

19.6.13 EXTI CPU wake-up with interrupt mask register (EXTI_IMR1)

Address offset: 0x080

Reset value: 0x0000 0000

Contains register bits for configurable events.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IM18IM17IM16
rwrwrw
1514131211109876543210
IM15IM14IM13IM12IM11IM10IM9IM8IM7IM6IM5IM4IM3IM2IM1IM0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 IM[18:0] : CPU wake-up with interrupt mask on event input x (1) (x = 0 to 18)

When EXTI_SECCFGR.SECx is disabled, IMx can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SECx is enabled, IMx can only be accessed with secure access.

Non-secure write to this bit is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIVx is disabled, IMx can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIVx is enabled, IMx can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0: Wake-up with interrupt request from input event x is masked.

1: Wake-up with interrupt request from input event x is unmasked.

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

  1. 1. The reset value for configurable event inputs is set to 0 to disable the interrupt by default.

19.6.14 EXTI CPU wake-up with event mask register (EXTI_EMR1)

Address offset: 0x084

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EM18EM17EM16
rwrwrw
1514131211109876543210
EM15EM14EM13EM12EM11EM10EM9EM8EM7EM6EM5EM4EM3EM2EM1EM0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:19 Reserved, must be kept at reset value.

Bits 18:0 EM[18:0] : CPU wake-up with event generation mask on event input x (x = 0 to 18)

When EXTI_SECCFGR.SECx is disabled, EMx can be accessed with non-secure and secure access.

When EXTI_SECCFGR.SECx is enabled, EMx can only be accessed with secure access.

Non-secure write to this bit x is discarded and non-secure read returns 0.

When EXTI_PRIVCFGR.PRIVx is disabled, EMx can be accessed with privileged and unprivileged access.

When EXTI_PRIVCFGR.PRIVx is enabled, EMx can only be accessed with privileged access. Unprivileged write to this bit is discarded.

0: Wake-up with event generation from Line x is masked.

1: Wake-up with event generation from Line x is unmasked.

Note that bits 18:17 are reserved on STM32WBA50/52xx devices.

19.6.15 EXTI register map

Table 142. EXTI register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x000EXTI_RTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RT18 (1)RT17 (1)RT16RT15RT14RT13RT12RT11RT10RT9RT8RT7RT6RT5RT4RT3RT2RT1RT0
Reset value000000000000000000
0x004EXTI_FTSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FT18 (1)FT17 (1)FT16FT15FT14FT13FT12FT11FT10FT9FT8FT7FT6FT5FT4FT3FT2FT1FT0
Reset value000000000000000000
0x008EXTI_SWIER1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SW18 (1)SW17 (1)SW16SW15SW14SW13SW12SW11SW10SW9SW8SW7SW6SW5SW4SW3SW2SW1SW0
Reset value000000000000000000
0x00CEXTI_RPR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RPIF18 (1)RPIF17 (1)RPIF16RPIF15RPIF14RPIF13RPIF12RPIF11RPIF10RPIF9RPIF8RPIF7RPIF6RPIF5RPIF4RPIF3RPIF2RPIF1RPIF0
Reset value000000000000000000
0x010EXTI_FPR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FPIF18 (1)FPIF17 (1)FPIF16FPIF15FPIF14FPIF13FPIF12FPIF11FPIF10FPIF9FPIF8FPIF7FPIF6FPIF5FPIF4FPIF3FPIF2FPIF1FPIF0
Reset value000000000000000000
0x014EXTI_SECCFG1RRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SEC18 (1)SEC17 (1)SEC16SEC15SEC14SEC13SEC12SEC11SEC10SEC9SEC8SEC7SEC6SEC5SEC4SEC3SEC2SEC1SEC0
Reset value000000000000000000
0x018EXTI_PRIVCFG1RRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PRIV18 (1)PRIV17 (1)PRIV16PRIV15PRIV14PRIV13PRIV12PRIV11PRIV10PRIV9PRIV8PRIV7PRIV6PRIV5PRIV4PRIV3PRIV2PRIV1PRIV0
Reset value000000000000000000
0x020 to 0x05CReservedReserved
0x060EXTI_EXTICR1EXTI3[7:0]EXTI2[7:0]EXTI1[7:0]EXTI0[7:0]
Reset value00000000000000000000000000000000
0x064EXTI_EXTICR2EXTI7[7:0]EXTI6[7:0]EXTI5[7:0]EXTI4[7:0]
Reset value00000000000000000000000000000000
0x068EXTI_EXTICR3EXTI11[7:0]EXTI10[7:0]EXTI9[7:0]EXTI8[7:0]
Reset value00000000000000000000000000000000
0x06CEXTI_EXTICR4EXTI15[7:0]EXTI14[7:0]EXTI13[7:0]EXTI12[7:0]
Reset value00000000000000000000000000000000
0x070EXTI_LOCKRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LOCK
Reset value0
0x074 to 0x07CReservedReserved

Table 142. EXTI register map and reset values (continued)

OffsetRegister313029282726252423222120191817161514131211109876543210
0x080EXTI_IMR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IM18 (1)IM17 (1)IM16IM15IM14IM13IM12IM11IM10IM9IM8IM7IM6IM5IM4IM3IM2IM1IM0
Reset value0000000000000000000
0x084EXTI_EMR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EM18 (1)EM17 (1)EM16EM15EM14EM13EM12EM11EM10EM9EM8EM7EM6EM5EM4EM3EM2EM1EM0
Reset value0000000000000000000
0x088
to
0x3FC
ReservedReserved

1. Bit reserved on STM32WBA50/52xx devices.

Refer to Section 2.3 for the register boundary addresses.