2021-03-10 09:16 PM
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 ?
2021-03-26 02:59 AM
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 .
2021-03-26 08:19 AM
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?
2021-03-30 12:31 AM
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