STM32CubeMX (STM32WBA63, TrustZone): Can EXTI11 IRQ target be set to Non-Secure while PA11 remains USART2_RX?
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:
- Is it supported in STM32CubeMX to configure EXTI11_IRQn as Non-Secure when PA11 is assigned to USART2_RX?
- If yes, where is this setting in the CubeMX UI?
- 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.
