Hi Walter;

 

I had this problem myself.

Basically the first interrupt is bogus (I have no idea why) and the rest will 
be real.

 

So my work-around was to set a flag that says “this was the first interrupt” 
and the IRQ routine checks the flag.

I know that is lame, but it worked for me J

 

Good luck.

BTW: I used it in the software for the book below ;-)

 

 

http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book

 

From: [email protected] [mailto:[email protected]] On 
Behalf Of Walter Schilling
Sent: Saturday, March 22, 2014 12:44 PM
To: [email protected]
Subject: [beagleboard] Phantom Button Presses on Beaglebone White

 

Good afternoon.

 

I am working on a project on the beaglebone white (as the blacks are out of 
stock) and GPIO.  I have tried two different setups, as shown below for my 
pushbutton, and I am using the circuitco prototyping cape.

 

Configuration 1:

I have my pushbutton connected from GPIO0_26 to ground, and there is a 3.3K 
pull up resistor connected to 3.3 volts.  I am assuming there are no active 
pull up or pull downs in the system.

 

Configuration 2:

The pushbutton is connected in series from GPIO0_26 through the 3.3K resistor 
to 3.3 V, and we are relying on the internal pull down resistor to keep the pin 
low.

 

In either case, I am getting "phantom" interrupts when I poll for the pin to 
change state.  My gut feeling is they are brought on by noise.  I'd like to do 
away with the exteral pull up or pull down, but I don't see any way to do that 
with the gpio driver from the documentation at 
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt, as it doesn't seem to 
provide access to pull up and pull down configurations.

 

This leads to the following questions:

#1 Can someone provide me with the default pull up / pull down settings for an 
input when exported with /sys/class/gpio?

#2 Short of going through the device tree (which seems horribly complicated to 
simply change a pull up or pull down resistor setting), is there an easy way to 
set of clear the PU/PD resistor through a c program?

 

I have seen multiple tutorials online dealing with this issue, but most of them 
point to older kernel versions and when i try to follow them, they break very 
quickly.

 

I am using the March 5, 2014 official beaglebone debian image.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.



No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4336 / Virus Database: 3722/7231 - Release Date: 03/22/14

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to