Thursday, May 17, 2012

GPIO on Beagleboard xM rev C

For BB xM Rev C the expansion pin 24 (GPIO168) is reserved for the I2C SCL signal and it cannot be changed without tweaking U-Boot and kernel settings. You can export GPIO168 just fine and it appears as if you could change the state, however the pin stays high no matter what you do.

Instead one should use pin 22 for instance (GPIO157). This works fine.

So:

cd /sys/class/gpio
echo "157" > export
cd gpio157
echo "low" > direction (voltage on pin 22 should go low)
echo "high" > direction (voltage on pin 22 should go to 1.82V)

2 comments:

  1. Any questions, you know what's working voltage GPIO's? A white LED work?
    thanks

    ReplyDelete
    Replies
    1. What I would suggest is wiring the positive end of the led to pin 22 and the negative end of the led to a resistor (e.g., something in range 300 Ω to 2KΩ) (the other end to ground) and experiment. Various resistor values will affect the intensity of the LED. You can search on the web for "simple led circuit" to get examples of how to wire such a circuit, and pin 22 will replace directly wiring to VIN (e.g., 5V) in most circuits your search will uncover.

      Delete