Skip to main content
Visitor II
March 11, 2021
Question

Interrupt continuously coming in EXTI interrupt handler after clearing the interrupt .also interrupt is not occurring on both edges . only falling edge triggering is working. Can you give me solution to this problem ?

  • March 11, 2021
  • 12 replies
  • 3312 views

I am using STM8L152R8 development board. I have configured push button interrupt on Pin no. PG6. i required both edges interrupt . but interrupt is occurring on falling edge only .

Can you give any suggestion to this problem.?

can you suggest me any logic to trigger the interrupt on both edges though it is only occurring on falling ?

    This topic has been closed for replies.

    12 replies

    Visitor II
    March 26, 2021

    Searching for errors.... hard when you wrote the code yourself, even harder when someone else did it :)

    I was thinking about what you want to do: measure the on- and off time of a signal. EXTI is one way to do that, but I would have used a timer instead. What was your reason not to use a timer?

    DJosh.0Author
    Visitor II
    March 30, 2021

    Hello,

    I am using timer for counting how much time button is pressed . main error was its coming in exti interrupt handler continuously even if i have not pressed the button.

    for my application i want the count how much time button is pressed if 3 sec. do something and if 5 sec do something .

    thanks for your support. It resolved my problem .

    GPIO_Mode_In_PU_IT this parameter is not specified in gpio.c file and specified in gpio.h file .

    by mistake i have not checked the gpio.h file correctly ,this is the main reason of error.

    thanks and regards

    Deoyani