Skip to main content
Graduate
March 7, 2024
Solved

STM32L562VET6 won't enter EXTI callback function.

  • March 7, 2024
  • 2 replies
  • 2252 views

I'm unable to receive the external interrupt from both EXTI1 and EXTI8 interrupt lines
The triggering is set to faling edge detection and the pin is pulled up externally and the push button connected to the pin shorts it with the ground to create faling edge pulse.
But when I debug the program isn't entering the Interrupt callback funtion when it encounters falling edge.
Any help will be appreciated.
Thanks a lot in advance.

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello @Giridhara_Datta_G ,

    After having a look at your example, I noticed that you're using a callback named HAL_GPIO_EXTI_Callback() 

    which is used in oldest HAL products while you need to use HAL_GPIO_EXTI_Falling_Callback() in your case.

    After making the fix, the callback is called when one of the two EXTI interrupts is fired.

    Hope it helps.

    2 replies

    Technical Moderator
    March 7, 2024

    Hello,

    I don't see an issue in your test code!

    Unfortunately I don't have an L5 board to do the test.

    Meanwhile, Are you sure there is nothing connected externally to PB1 and PA8 (except the pull-ups)?

    And it you try to test these I/Os in output mode and toggle them? are you seeing something on their outputs (just to ensure that they are not broken)?

    Graduate
    March 7, 2024

    When I observe the GPIO levels in the live update of the GPIOB->IDR1 Register under SFRs I'm seeing the change in the levels according to my input. But that is not reflecting to the ISR funtion. the falling edge is not triggering the callback function.

    There is nothing else connected to the interrupt pins except the pull-up. the same code and the pullup circuit is working fine with the corresponding pins in STM32L432kc Nucleo board.

    Graduate
    March 7, 2024

    Is there any other configuration settings that I have missed?

     

    Technical Moderator
    March 11, 2024

    Hello @Giridhara_Datta_G ,

    I will try the project during this week with NUCLEO-L552ZE-Q board and get back to you as soon as I have an answer/feedback.