primer for GPIO on the Beagleboard -xM

10 views
Skip to first unread message

Gary Pajer

unread,
Jul 20, 2016, 2:57:08 PM7/20/16
to BeagleBoard
I have one (rev A2, I think) and I want to access GPIO.

Is there a good, relatively complete source of info on how to do this?  I see some things for the BeagleBoneBlack, but very little for the BB -xM.   Are the instructions identical?  For example, for the BBB there is some calculation that has to be done to associate a pin with the "device" exposed by the kernel.  Is it done differently on the BB?

I also see a lot of short instructions like "change the MUX for the pin in the device tree".    I need to know what the device tree is, and how to change the MUX there.

I really need some basic information about how this works, preferably in one (or a few) places.  Thanks.

William Hermans

unread,
Jul 20, 2016, 3:06:16 PM7/20/16
to beagl...@googlegroups.com
The general concept behind GPIO from Linux is going to be very similar. As they're both probably using libGPIO, if you're using a modern kernel on your xM.

So you have:

/sysclass/gpio/ as the base path for libGPIO sysfs.  Which in turn will have 'export', and 'unexport' files for exporting, and exporting gpio pins. Then of course. something like:

echo '24' > /sys/class/gpio/export is going to have slightly different implications across platforms. Meaning that of course, 'gpio24' will have a different meaning for a Beaglebone versus a beagleboard. They'll both be GPIO's of course.

As to actual device tree file pin muxing . . . I'm not sure. I would think it should be similar, but I'm also not sure of the xM's pin muxing capabilities.

--
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 beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/54a25865-c358-4662-a9d8-f86ce39b44db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages