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!
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?
2023-08-15 04:04 AM
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();
}
}
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.
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).
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.
2023-08-15 04:25 AM
PE11 as EXTI.
2023-08-15 04:40 AM
Is PE11 selected as EXTI11 input in respective SYSCFG_EXTICRx?
JW
2023-08-15 08:24 PM
Yes it is.