Low-Level Driver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 03:47 AM
Hello
I have been working on some project which require external interrupt (EXTI). It is a custom PCB with stm32L476vgtx MCU. I am able to verify interrupt via HAL library but unable to do so with the LL driver library. I have used the repository example to do so but no luck. I have never worked with LL drivers before, so anyone could please guide me what could possibly go wrong. I have only changed the pin configuration mentioned in the example, nothing else.
Thanks in advance!
- Labels:
-
STM32L4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 03:57 AM
Probably you aren't using the correct EXTI callback. The interrupt handler name is different for different pins. Show your code, what did you change specifically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 04:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 04:08 AM
EXTI15_10_IRQHandler as callback function.
#define USER_BUTTON_IRQHANDLER EXTI15_10_IRQHandler
void USER_BUTTON_IRQHANDLER(void)
{
/* Manage Flags */
if(LL_EXTI_IsActiveFlag_0_31(USER_BUTTON_EXTI_LINE) != RESET)
{
LL_EXTI_ClearFlag_0_31(USER_BUTTON_EXTI_LINE);
/* Manage code in main.c.*/
UserButton_Callback();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 04:10 AM
The same hardware is working fine with HAL library. Been using the same port/pin which is working with HAL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 04:19 AM
LL doesn't have a unified callback like HAL, it just puts code in the IRQ handler itself (as below).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 04:19 AM - edited ‎2023-08-15 04:20 AM
And what is USER_BUTTON_EXTI_LINE? Is it a pin between 10 and 15? If not, callback will be different.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 04:25 AM
PE11 as EXTI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 04:40 AM
Is PE11 selected as EXTI11 input in respective SYSCFG_EXTICRx?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-15 08:24 PM
Yes it is.