Skip to main content
Associate II
June 17, 2026
Solved

STM32CubeMX (STM32WBA63, TrustZone): Can EXTI11 IRQ target be set to Non-Secure while PA11 remains USART2_RX?

  • June 17, 2026
  • 1 reply
  • 42 views

Hello,

I am using STM32CubeMX with an STM32WBA63 project in TrustZone enabled mode, and I have a question about interrupt security attribution.

My use case:

  • PA11 is configured as USART2_RX (non-secure application).
  • In low power mode, I need wakeup on UART RX activity.
  • This relies on EXTI11, so I need EXTI11_IRQn to be targeted to the Non-Secure world (ITNS0 bit 22 = 1).

Issue:

  • In CubeMX, I cannot find a way to set EXTI11_IRQn as Non-Secure while PA11 is kept as USART2_RX.
  • EXTI11 appears configurable only if I change the pin function to GPIO EXTI, but then USART2 configuration becomes incomplete.

Questions:

  1. Is it supported in STM32CubeMX to configure EXTI11_IRQn as Non-Secure when PA11 is assigned to USART2_RX?
  2. If yes, where is this setting in the CubeMX UI?
  3. If not currently supported, what is the recommended ST approach?
    • Manual USER CODE override in partition configuration?
    • Post-generation patch/script?
    • Any other official best practice?

Current workaround:

  • I manually set EXTI11 to Non-Secure in USER CODE in the secure partition configuration, and this works.
  • I want to confirm whether there is a native CubeMX way to do it and the recommended maintainable approach.

Tool versions:

  • STM32CubeMX: 6.15.0
  • STM32CubeWBA package: STM32Cube FW_WBA V1.7.0

Thanks in advance.

Best answer by Souhaib MAZHOUD

Hello ​@lgc 

Thank you for sharing your feedback in ST Community,
STM32CubeMX currently does not support this configuration in the GUI, for this use case, PA11 must remain configured as USART2_RX, It should not be changed to GPIO_EXTI11. I recommend that you manually set EXTI11_IRQn to Non-Secure in the Secure code as you described.

KR, Souhaib

1 reply

Souhaib MAZHOUDBest answer
ST Technical Moderator
June 18, 2026

Hello ​@lgc 

Thank you for sharing your feedback in ST Community,
STM32CubeMX currently does not support this configuration in the GUI, for this use case, PA11 must remain configured as USART2_RX, It should not be changed to GPIO_EXTI11. I recommend that you manually set EXTI11_IRQn to Non-Secure in the Secure code as you described.

KR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.