STM32H503 External Interrupt HAL Library Doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 12:02 AM
Dear All,
Recently I am learning STM32H503CBU6, but I find the external interrupt doesn't work with HAL library. I want to get reference from official example code, I only find external interrupt example code with LL library in official SDK. I think STM32H5x HAL should support external interrupt. My code and CUBEMX setting showed as below. Could you kindly help advise about this problem?
Thanks for your help so much!
Best regards,
Gerald
 
    
Solved! Go to Solution.
- Labels:
-
Interrupt
-
STM32H5 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 6:19 AM
Looks right it's calling the right functions to me.
Does EXTI5_IRQHandler get called? Set a breakpoint.
Does the IDR5 bit in GPIOB->IDR bit 5 get toggled as the line is toggled?
Example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 6:19 AM
Looks right it's calling the right functions to me.
Does EXTI5_IRQHandler get called? Set a breakpoint.
Does the IDR5 bit in GPIOB->IDR bit 5 get toggled as the line is toggled?
Example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 3:52 PM
Hi TDK,
Thanks for your replying a lot. I compared the example you provided and my code, and I found the callback function was different. After I can changed as below, it works. Is it new feature of HAL?
Thanks,
Gerald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-16 4:28 PM
It's been that way as long as the H5 HAL has existed (2 years).
On some other families, it is HAL_GPIO_EXTI_Callback because there's no way to know in general if it's due to a falling or rising edge.
