Wiring of switches on BBB


when I’m not wrong the boot-switch of the BBB is connected to GPIO0[22] so that it could be checked out of software using this input. Reset is connected to the reset line…and the power switch? I could not find it, so my question: can it be checked via software too?


Power switch is connected to the PMIC. It generates and interrupt to the processor. So it can be detected by SW.


thanks Gerald, but could you please also tell me how it can be done?
Is it possible to make it using simple bash commands?


I am the HW guy. I will let a SW person come with some idea on how to do it.


@Gerald: my first assumption that the boot-switch is connected to
GPIO0[22] does not seem to be correct, I can't read this input from my
software. So...is it connected to some other GPIO or do I need to
search for a bug in my software?

That pin is one of the LCD pins. GPIO pin is not available because the LCD pin is connected to the physical pin instead. You will need to disable HDMi in order to access that pin as a GPIO pin.

The schematic is correct.


I'm running a bare-metal application and do not use HDMI/LCD pin.
But...is my interpretation correct that GPIO0[22] is the pin for that
button? I'm really not sure at the moment...

You are right, your assumpion was not correct, carefully and slowly reading the BBB_System_Reference_Manual_rev_A52_1701090.pdf, my guess falls on:

Port8 pin 43 -> GPIO2_8

but, as Gerald suggests, this doesn't solve the problem, this switch, as the other two (power&reset) are used by the system and there should be certainly a way to free them for another purpose, but we don't know it.

By now, it's safer getting a switch and find a free pin to connect it to.


It is GPIO2_8. Not sure how Linux handles this these days, but this would be the 72nd GPIO pin


Great, thanks! Since I'm doing bare-metal programmign without any
operating system it is not a big deal to reconfigure the pin MUX and
use it as GPIO. LCD is not needed in my case so it is not a problem
when this functionality got lost.