Skip to contentSkip to conversation

Noise causes gpio interrupt

DISCUSSION Arnold 4 participants 6 messages Jan 25, 2007 – Jan 29, 2007

lore
Share & tools
lore

Arnold

author
#0 lore raw

Hi All,

I am working on omap5912 and I am using linux 2.6.17. I am using a gpio to handle interrupts. I believe that I am having a noise interrupt which my firmware thinks is a really interrupt. Is there a way to distinguish a noise interrupt from a real interrupt?

Thanks,
Arnold

____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

#1 lore raw

I don't know about the GPIO module in 5912. If you have, you can try configuring your GPIO interrupt to level instead of edge interrupt. I don't know if debounce time can help you in fixing this.

Regards,
Khasim

________________________________

From: [email protected] on behalf of Arnold
Sent: Thu 1/25/2007 3:40 AM
To: [email protected]
Subject: Noise causes gpio interrupt

Hi All,

I am working on omap5912 and I am using linux 2.6.17. I am using a gpio to handle interrupts. I believe that I am having a noise interrupt which my firmware thinks is a really interrupt. Is there a way to distinguish a noise interrupt from a real interrupt?

Thanks,
Arnold

____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
_______________________________________________
Linux-omap-open-source mailing list [email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

#2 lore raw

Depending on the polarity and the circuit you might also get away configuring the internal pull-up/down to try and help mask any noise.

In the past for some early designs I recall things like the lcd inducing noise on the touch screen interrupt. For that I believe we dumped an external pull up one the line to stop it (along with board routing and bits to diminish the noise). The internal pull's aren't so strong, but if your on the edge and the driver of that line can force the state it might be enough to mask it.

Regards,
Richard W.

Quoted 56 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Syed Mohammed, Khasim
Sent: Thursday, January 25, 2007 3:44 AM
To: Arnold; [email protected]
Subject: RE: Noise causes gpio interrupt

I don't know about the GPIO module in 5912. If you have, you can try configuring your GPIO interrupt to level instead of edge interrupt. I don't know if debounce time can help you in fixing this.

Regards,
Khasim

________________________________

From: [email protected] on behalf of Arnold
Sent: Thu 1/25/2007 3:40 AM
To: [email protected]
Subject: Noise causes gpio interrupt

Hi All,

I am working on omap5912 and I am using linux 2.6.17. I am using a gpio to handle interrupts. I believe that I am having a noise interrupt which my firmware thinks is a really interrupt. Is there a way to distinguish a noise interrupt from a real interrupt?

Thanks,
Arnold

______________________________________________________________
______________________
Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
_______________________________________________
Linux-omap-open-source mailing list [email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

author
#3 lore raw

Hi,

First, Thank you for your help. I really appreciate it. It seems that my problem is the other way around. I think I am not getting a noise but instead I could not detect interrupts that has a fast transition. I tried to use a switch to see if the driver is working properly, and it looks fine. It could detect a switch being press. However when the interupt comes from a device and the transition of rise to fall is 20ns it could not detect that an interrupt occured. I also tried to increase the transition to 20ms and it was able to detect the interrupt. I am thinking now that maybe the gpio register have not updated yet the register but the signal is already falling. So maybe thats why it didnt see it as an interrupt. Have anyone encountered the same problem? Is there any recent patch on the interrupt routine that may solve the problem?

Thanks erveryone for your help,
Arnold

Quoted 17 lines · Richard

Depending on the polarity and the circuit you might also get away
configuring the internal pull-up/down to try and help mask any noise.

In the past for some early designs I recall things like the lcd inducing
noise on the touch screen interrupt. For that I believe we dumped an
external pull up one the line to stop it (along with board routing and
bits to diminish the noise). The internal pull's aren't so strong, but
if your on the edge and the driver of that line can force the state it
might be enough to mask it.

Quoted 9 lines

Regards,
Richard W.

Quoted 2 lines

-----Original Message-----
From:

[email protected]

Quoted 1 line

[mailto:[email protected]]

Quoted 31 lines

On

Quoted 6 lines

Behalf Of Syed Mohammed, Khasim
Sent: Thursday, January 25, 2007 3:44 AM
To: Arnold; [email protected]
Subject: RE: Noise causes gpio interrupt

I don't know about the GPIO module in 5912. If you

have, you

Quoted 1 line

can try configuring your GPIO interrupt to level

instead of

Quoted 1 line

edge interrupt. I don't know if debounce time can

help you in

Quoted 8 lines

fixing this.

Regards,
Khasim

________________________________

From:

[email protected] on
behalf

Quoted 9 lines

of Arnold
Sent: Thu 1/25/2007 3:40 AM
To: [email protected]
Subject: Noise causes gpio interrupt

Hi All,

Quoted 18 lines
Quoted 1 line

I am working on omap5912 and I am using linux

2.6.17.

Quoted 1 line

I am using a gpio to handle interrupts. I believe

that I am

Quoted 1 line

having a noise interrupt which my firmware thinks

is a really

Quoted 1 line

interrupt. Is there a way to distinguish a noise

interrupt

Quoted 9 lines

from a real interrupt?

Thanks,
Arnold

______________________________________________________________

Quoted 11 lines
Quoted 2 lines

______________________
Now that's room service! Choose from over 150,000

hotels in

Quoted 1 line

45,000 destinations on Yahoo! Travel to find your

fit.

Quoted 5 lines

http://farechase.yahoo.com/promo-generic-14795097
_______________________________________________
Linux-omap-open-source mailing list
[email protected]

http://linux.omap.com/mailman/listinfo/linux-omap-open-source

Quoted 7 lines
Quoted 6 lines

_______________________________________________
Linux-omap-open-source mailing list
[email protected]

http://linux.omap.com/mailman/listinfo/linux-omap-open-source

Quoted 2 lines
Quoted 1 line

____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com

#4 lore raw
Quoted 5 lines · Arnold

... However when the interupt comes from a device and the transition of rise to fall is 20ns it could not detect that an interrupt occured. I also tried to increase the transition to 20ms and it was able to detect the interrupt. ...

Maybe http://www.ti.com/litv/pdf/spru767a, section 1.6 or page 28, can help:

"Because of the sample operation with the functional clock, the minimum pulse width on the input GPIO to trigger a synchronous interrupt request is two times the functional clock period. This minimum pulse width must be met before and after any expected level transition detection."

Best regards

Dirk

#5 lore raw

I generally interpret this to mean you can go low, high, low to fast else you will miss your high. This is not what was indicated but it could be what is happening. Your 'high' state must also obviously cross the signaling threshold value also.

If you go low to high quickly I'm not aware of that being an issue. You just don't see it for a couple of gpio clocks (assuming you stay high long enough).

It might be possible that the interrupt was dropped somewhere in software. Back in 1510/5910 days this was possible given the way Linux configured things up and serviced interrupts (mismatch of internal polarity to configured ones along with quickly unmasked interrupts). This shouldn't be an issue for later ones like OMAP2 which hook them all internally as level and only offer edge's on external lines. MV code at one point tried to peek at status registers and re-trigger to identify edges. I've not looked at what the current code path is for open source versions here.

You may have a couple types of GPIOs, used to have ARMIO/MPUIO and GPIO. You might try moving your source to some different pins and see if they all behave the same way.

If you have a debugger, you really should be able to sit in a stopped state then make a fast trigger event. Then you should be able to read the GPIO registers directly and see if the event was caught. It almost certainly will be.

In the end I'd guess your source isn't driving the line high enough for the interrupt pulse, or the pulse width is to short. I don't think the slope of the pulse should matter. Just that it goes high enough for a long enough time before falling.

Regards,
Richard W.

Quoted 21 lines
Quoted 5 lines · Arnold

... However when the interupt comes from a device and the transition of rise to fall is 20ns it could not detect that an interrupt occured. I also tried to increase the transition to 20ms and it was able to detect the interrupt. ...

Maybe http://www.ti.com/litv/pdf/spru767a, section 1.6 or page 28, can help:

"Because of the sample operation with the functional clock, the minimum pulse
width on the input GPIO to trigger a synchronous interrupt request is two times
the functional clock period. This minimum pulse width must be met before and
after any expected level transition detection."

Best regards

Dirk