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, 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.

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 :wink:


I am afraid PU/PD settings are controlled by device tree, so you will have to use them! You will be able to easily edit your current device tree to change it, assuming you aren't using the default pin state. If you are using the default pin state, then I would strongly recommend getting a proper device tree file setup as it is not a good idea to assume that the pin you are using will always come up in that state.


I have just added pull-up and pull-down support to my universal cape

Compile and load the overlay, then you can simply:

  sudo ./config-pin P8.14 in+

To enable the pin's pull-up resistor.