Using GPIO in BBB.Is it necessary to use Device Overlay?

77 views
Skip to first unread message

Raul Piper

unread,
May 26, 2016, 9:46:20 AM5/26/16
to BeagleBoard
HI ,  
I am new to BBB.I am trying to create a user app to access GPIO in BBB.I came across this video - > https://www.youtube.com/watch?v=wui_wU1AeQc  .Is it really necessary to use Device overlay to access the GPIOs?
Can some one please post a link to how to get started with  GPIOS on BBB.
Rgds,
Rp

Vincent lc

unread,
May 26, 2016, 11:02:15 AM5/26/16
to BeagleBoard
Hi, 

If you want to use a kernel version >= 3.8, you are obliged to use a DTS (Device tree source) in order ton configured the GPIO.
And I advised you to use one because It's important to be on page :-)

I like lots of microcontroller, you always need to configured pins before using them, here, the way is to use the overlay (mean that they are load when the board is steal running) ;-).
The video that you posted is a good example, you can also check the associate website : http://exploringbeaglebone.com/chapter6/  where you can download source code and so on ^_^.

Have a lovely day !
Enjoy 
Vincent

William Hermans

unread,
May 26, 2016, 11:26:36 AM5/26/16
to beagl...@googlegroups.com
HI ,  
I am new to BBB.I am trying to create a user app to access GPIO in BBB.I came across this video - > https://www.youtube.com/watch?v=wui_wU1AeQc  .Is it really necessary to use Device overlay to access the GPIOs?
Can some one please post a link to how to get started with  GPIOS on BBB.
Rgds,

Yes, and no. My understanding is that some pins can only be configured as a GPIO, so these do not need to be muxed by way of a device tree file. For multi purpose pins however( multiple possible peripherals on the same pin ), you need to mux the pins for GPIO( 0x7 ). Perhaps universal IO can be used too ?

--
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/fd6bd2e6-6fcf-4c61-918a-c82575ec076b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
May 26, 2016, 11:29:37 AM5/26/16
to beagl...@googlegroups.com
For instance, here are two such pins that do not need to be muxed prior to exporting.

william@beaglebone:~/dev$ ls /sys/class/gpio/
export  gpiochip0  gpiochip32  gpiochip64  gpiochip96  unexport
william@beaglebone:~/dev$ echo 49 > /sys/class/gpio/export
william@beaglebone:~/dev$ echo 60 > /sys/class/gpio/export
william@beaglebone:~/dev$ ls /sys/class/gpio/
export  gpio49  gpio60  gpiochip0  gpiochip32  gpiochip64  gpiochip96  unexport


Raul Piper

unread,
May 26, 2016, 2:57:38 PM5/26/16
to BeagleBoard
Hi Vincent,William,
Yes I am using Kernel > 3.8 (4.1) and trying to simulate the SPI signals on the GPIOs.(CLK,Data,CS)
I don't want to use the host SPI driver and want to implement evrythign via GPIO.
any comments !
Rgds,
Rp

William Hermans

unread,
May 26, 2016, 3:04:51 PM5/26/16
to beagl...@googlegroups.com
Hi Vincent,William,
Yes I am using Kernel > 3.8 (4.1) and trying to simulate the SPI signals on the GPIOs.(CLK,Data,CS)
I don't want to use the host SPI driver and want to implement evrythign via GPIO.
any comments !
Rgds,
Rp

I think you will need the PRUs to do all that. Doing all this in software from even kernel space wont work without hardware to back it up. Meaning, I think a pure software implementation would be too slow.

--
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.
Reply all
Reply to author
Forward
0 new messages