GPIO Interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-30 10:58 PM
Is it possible to disable a specific GPIO interrupt in my code and re-enable it after some time. HAL_NVIC_DisableIRQ(EXTI4_15_IRQn) this function will help but this will disable all the GPIO pins connected to that particular EXTI line. Any other possible ways I can implement?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-01 12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-30 11:16 PM
Which STM32?
In most STM32 the individual EXTI interrupts are enabled/disabled in the EXTI_IMR register, see EXTI chapter in Reference Manual (RM).
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-01 1:13 AM - edited ‎2023-12-01 1:13 AM
I am using STM32G474RCT6 controller.
Should I need to make changes in the EXTI_IMR register. Or are there any HAL functions I can use to Implement this. Currently I could be able to disable EXTI15_10_IRQn which disables all the GPIOs connected to this line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-01 2:01 AM
I don't use Cube/HAL.
I've seen in the past users to perform the same operation as when initializing the pin, just without the interrupt being set.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-01 2:31 AM
Hello @Sri_Nishanth
According to the reference manual, EXTI line dedicated to 10->15 are regrouped in one vector in NVIC controller. So, using CMSIS, this should not be possible. Maybe, we can implement this operation in HAL driver using directly EXTI_IMR. I will forward the request to dedicated team.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-01 3:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-01 12:08 PM
You can use LL_EXTI_EnableIT_0_31() and LL_EXTI_DisableIT_0_31()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-03 9:20 PM
Thanks!!
This worked:grinning_face::handshake:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-13 7:56 PM - edited ‎2024-08-13 8:51 PM
Thanks for the solution. When calling for example:
LL_EXTI_EnableIT_0_31(uint32_t EXTI_Line);
how do the individual "EXTI_Line"s map to specific GPIO ports and pins? I see "lines" referenced in the reference manual, but I don't understand the mapping.
EDIT: I may have found the mapping on page 271. It seems that, for example:
LL_EXTI_Disable_IT_0_31(LL_EXTI_LINE_3);
will disable the interrupts on pin 3 of ALL ports. Is that right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-15 12:30 AM
These are two different things.
First comes the multiplexer controlled by SYSCFG register, which selects, which port's pin is used for that particular EXTIn, n = 0..15.
Then output of that multiplexer enters EXTI module and you can then there enable/disable individual EXTI in the EXTI_IMR register, see EXTI chapter in Reference Manual (RM). That's what those LL functions/macros do.
Cube/LL is open source, so you can look up yourself what the macros/functions do.
JW
