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

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

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 :slight_smile:

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

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 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

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

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.