Skip to Content
Block descriptionsGPIOGPIO EXTI

GPIO EXTI Block Description

This block enables the usage of GPIO in External Interrupt Mode (EXTI) within STM microcontrollers.



GPIO EXTI block

Table of Contents

Inputs

This block has no inputs.

Outputs

Output NameTypeDescription
Rising edge IRQboolConditional output
Output port returning an interrupt trigger on a rising edge signal. This port is accessible when the Select Edge parameter is configured to Rising.
Falling edge IRQboolConditional output
Output port returning an interrupt trigger on a falling edge signal. This port is accessible when the Select Edge parameter is configured to Falling.
Rising/Falling edge IRQboolConditional output
Output port returning an interrupt trigger on both rising and falling edge signals. This port is accessible when the Select Edge parameter is configured to Rising/Falling.

Block Parameters

ParameterDescription
LineEXTI hardware line index number.
PortGPIO port identifier letter, e.g., 'A', 'B', 'C', etc.
Select EdgeConfigures the edge event condition that triggers the hardware interrupt:
Rising – rising edge trigger.
Falling – falling edge trigger.
Rising/Falling – both edge triggers active.


Parameters for GPIO EXTI block

CubeMX Configuration for a Given MCU Model

No.NamePathSettingDescriptionScreenshot
1GPIO PIN as GPIO_EXTI*Pinout & Configuration > Pinout view > Right-click the selected pin > GPIO_EXTI*GPIO_EXTI*Selects the target GPIO pin assigned for EXTI functionality. The pin must be explicitly configured as GPIO_EXTI.GPIO Configuration in CubeMX
2GPIO ModePinout & Configuration > System Core > GPIO > GPIO > Left-click the selected pin > GPIO ModeExternal Interrupt Mode with the selected edgeSelects the operation mode for the GPIO pin. This configuration must match the block parameter setting.GPIO Configuration in CubeMX
3InterruptsPinout & Configuration > System Core > GPIO > NVICEnableEnables the core hardware interrupt channel for the specified GPIO pin.GPIO Configuration in CubeMX
4Preemption and Sub PriorityPinout & Configuration > System Core > NVIC > NVIC > selected GPIO EXTI line > Preemption Priority and Sub PrioritySelect desired user priority valuesConfigures the relative priority rankings for the designated GPIO pin interrupt.GPIO Configuration in CubeMX
5Generate IRQ handlerPinout & Configuration > System Core > NVIC > Code generation > Generate IRQ HandlerEnabledGenerates the corresponding interrupt service routine (ISR) function handler for the selected pin.GPIO Configuration in CubeMX

GPIO_EXTI* – the * symbol represents the specific EXTI line number assigned to the chosen GPIO pin. Depending on the MCU model, different physical pins map to specific internal EXTI hardware lines.

See Also

Last updated on