GPIO gives Multiple Interrupt events for single interrupt generation

Hans Dorn
Posts: 62
Joined: Tue Feb 21, 2017 2:21 am

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby Hans Dorn » Fri Apr 28, 2017 5:37 pm

You could do a quick check directly in the ISR if the last event has been too recent, and ignore the new interrrupt in this case.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby Ritesh » Sat Apr 29, 2017 1:06 am

Hans Dorn wrote:You could do a quick check directly in the ISR if the last event has been too recent, and ignore the new interrrupt in this case.
Yes. But that is work around solution that I have already thought to do it as I have did it into other controller as well before.

But, I just want to find out why it is happening and what is exact root cause for that?
Regards,
Ritesh Prajapati

at-ams
Posts: 1
Joined: Tue May 09, 2017 7:14 pm

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby at-ams » Tue May 09, 2017 7:49 pm

Hi,
I am seeing a similar behavior. I use an opto interrupter that has a nice positive pulse output signal when the light beam is interrupted by a pin sticking to a rotating wheel. I have checked the signal with my scope and the pulse has a clean 10 uSec rising edge, no bounce effect or anything like that. Still I see so now and then double interrupts being fired. So far I have not been able to work out the reason for this behavior. To get rid of the double interrupts, I start a software timer to black put any interrupts arriving in the 40 msec after the pulse has been started, unfortunately this does not help as a 'ghost' interrupts arrive with a random delay, sometimes up to 200msec later.

Anyone any ideas?

Regards,

Ad

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby Ritesh » Wed May 10, 2017 2:11 pm

at-ams wrote:Hi,
I am seeing a similar behavior. I use an opto interrupter that has a nice positive pulse output signal when the light beam is interrupted by a pin sticking to a rotating wheel. I have checked the signal with my scope and the pulse has a clean 10 uSec rising edge, no bounce effect or anything like that. Still I see so now and then double interrupts being fired. So far I have not been able to work out the reason for this behavior. To get rid of the double interrupts, I start a software timer to black put any interrupts arriving in the 40 msec after the pulse has been started, unfortunately this does not help as a 'ghost' interrupts arrive with a random delay, sometimes up to 200msec later.

Anyone any ideas?

Regards,

Ad
Hi,

Right Now, Temperature Solution for that is to check interrupt status with its value in interrupt ISR call so that you will get only onetime interrupt 90% based on Positive or Negative Edge Trigger Interrupt.

Let me know if need any help in code point of view
Regards,
Ritesh Prajapati

cyberman54
Posts: 27
Joined: Sun Jan 14, 2018 7:47 pm

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby cyberman54 » Sat Mar 23, 2019 12:30 pm

Same problem here. I feed GPIO0 with a Squarewave signal from RTC DS3231, generating iinterrupt on falling edge. Has hardware pullup 10k to VDD. I see 2-3 interrupts on each falling edge. Checked signal with oscillopscope, it is 100% clean, but has 50 microseconds slope, maybe this is too slow?

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby Ritesh » Mon Mar 25, 2019 12:38 pm

cyberman54 wrote:
Sat Mar 23, 2019 12:30 pm
Same problem here. I feed GPIO0 with a Squarewave signal from RTC DS3231, generating iinterrupt on falling edge. Has hardware pullup 10k to VDD. I see 2-3 interrupts on each falling edge. Checked signal with oscillopscope, it is 100% clean, but has 50 microseconds slope, maybe this is too slow?
Would you please check with logic as discussed into thread?
Regards,
Ritesh Prajapati

cyberman54
Posts: 27
Joined: Sun Jan 14, 2018 7:47 pm

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby cyberman54 » Sun Apr 14, 2019 1:56 pm

We can close this. I checked with digital oscilloscope and found a 100nf capacitor on the GPIO is too much. I removed the capacitor and the problem was solved.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: GPIO gives Multiple Interrupt events for single interrupt generation

Postby Ritesh » Wed Apr 17, 2019 5:24 pm

cyberman54 wrote:
Sun Apr 14, 2019 1:56 pm
We can close this. I checked with digital oscilloscope and found a 100nf capacitor on the GPIO is too much. I removed the capacitor and the problem was solved.
Great.

Thanks for update.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Baidu [Spider] and 346 guests