cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling Same Interrupt Number on Separate Ports [STM32H7]

bnguy.1
Associate III

I understand that any external interrupt on PA13, PB13, PC13, PD14 .. or PI15 will all execute the same ISR:

EXTI15_10_IRQHandler(void)
{ 
     HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13);
} 
 
 

Which calls HAL_GPIO_EXTI_IRQHandler before finally calling the user function HAL_GPIO_EXTI_Callback.

My question is, even though the chip can't separate PD13 and PE13, what issue is there with enabling PD13 & PE13 interrupts (one active high, one active low) and then in the user HAL_GPIO_EXTI_Callback checking the state of the input pins, in order to distinguish which of the 2 interrupts occurred?

(STM32 Cube won't allow both pins to be assigned a mode of EXTIO interrupt, so would what would be the issue in manually overwrite the generated code or is some other underlying reason why this cannot be done)

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Only one port interrupt may be active at one time for a given pin number. See the SYSCFG_EXTICRx register for the underlying hardware limitation.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Guru

Only one port interrupt may be active at one time for a given pin number. See the SYSCFG_EXTICRx register for the underlying hardware limitation.

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

The EXTI thing of STM32H7 is too complicated. It looks like interrupt and event router for various internal components, which also happens to provide EXTI functionality of previous STM32's.

The latter unfortunately can select only one GPIO port to each input 0-15.

Maybe there;'s even is a way to hook arbitrary H7 GPIOs to NVIC interrupts, but I could not find it.

--pa

Thanks, that mux looks to be the culprit.. it's unfortunate didn't realize this limitation before the board layout.

bnguy.1
Associate III

Thanks, any idea if this is an ARM IP thing or just something unique to ST's ARMs?