Enabling Same Interrupt Number on Separate Ports [STM32H7]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-15 12:19 PM
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)
Solved! Go to Solution.
- Labels:
-
GPIO-EXTI
-
Interrupt
-
STM32H7 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-15 12:37 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-15 12:37 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-15 1:21 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-16 2:02 PM
Thanks, that mux looks to be the culprit.. it's unfortunate didn't realize this limitation before the board layout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-16 2:03 PM
Thanks, any idea if this is an ARM IP thing or just something unique to ST's ARMs?
