cancel
Showing results for 
Search instead for 
Did you mean: 

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 ?

DJosh.0
Associate II

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 ?

12 REPLIES 12
DJosh.0
Associate II

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 .

WilkoL
Senior

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.0
Associate II

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