[beagleboard] GPIO doesn't seem to work for me

I am still new to the BeagleBoard and need to use two of the expansion
pins to generate output for a relay. There have been several problems
that I am experiencing.

'echo 136 > /sys/class/gpio/export' is not creating a gpio136 folder
(expansion pin 9).

I got access to pin 24 with 'echo 168 > /sys/class/gpio/export'
When I 'echo high > /sys/class/gpio/gpio168/direction' the direction
is out and the value is 1 but the actual output voltage is only 0.05V.
Setting it to low shows no visible change.

When I do the same steps as shown above with gpio 183 (pin 23) I
similarly have no control over the output voltage from the board which
is 1.80V.

When I try to do the above with gpio 150 and 149 (user LEDs) I have no
control. However If I set /sys/class/leds/beagleboar\:\:usr0/trigger
to "none" then /sys/class/leds/beagleboar\:\:usr0/brightness controls
the LED.

I can't seem to control gpio from /sys/class/gpio. Am I missing
something? Thanks for your time.


Have you correctly pinmuxed the GPIO pins to the header? Are there any error messages when you try to echo a number to /sys/class/gpio/export ?

– Andruk Tatum

I am getting no errors, however I found that pins 3 and 5 work for me
(139 and 138). I would still like to know why I cannot control most of
the pins though. I am not sure what you mean by "pinmuxed the GPIO
pins to the header".


I am not sure what you mean by "pinmuxed the GPIO
pins to the header".

You might be interested in reading this article:

AFAIK, the current strategy on BB is to do all pin muxing in u-boot and not
in kernel.


I’ve heard that, but I couldn’t easily get pinmuxing to work with U-boot. From what I’ve heard on this list (and researched elsewhere on the internet), the only pinmuxing that u-boot is doing is for individual supported addon boards. If you (or anybody reading this) wants to have custom pinmuxing, I’ve got patches against RCN’s 2.6.29 and 2.6.32 Ubuntu kernels for the McSPI4 device, UART2, and various GPIOs. It shouldn’t be too hard to adapt my patches to enable different functionality either.

So, Jason, if you would like my patches for RCN’s kernel (available here: https://code.launchpad.net/~beagleboard-kernel - I used 2.6-stable, revision 66).

Hope this helps somebody.
– Andruk

Thank you for your replies.