Beaglebone: Introduction to GPIOs - Using Device Tree Overlays under Linux 3.8+

  Рет қаралды 162,875

Derek Molloy

Derek Molloy

Күн бұрын

Пікірлер: 103
@ForgottenMachines
@ForgottenMachines 5 жыл бұрын
Even now, over 6 years later, this video is extremely helpful. I watched it 5 or 6 times, and followed each step on my BBB to get good control of these GPIO pins...thank you!!!
@tamtam4321
@tamtam4321 11 жыл бұрын
I'm just getting my hand on beagle bone black for a few days and found that your videos are absolutely helpful. THANK YOU SO MUCH and keep uploading new videos about Beaglebone Black please :D.
@georgebush7294
@georgebush7294 9 жыл бұрын
This is the best video I have found related to the GPIOs on BBB. Thanks Derek
@kbcbala
@kbcbala 11 жыл бұрын
Thanks for your time and patience. helped me to understand GPIO's. Wish i had a professor like you in my university.
@DrewFustini
@DrewFustini 11 жыл бұрын
Excellent video! Clear examples of how to configure Device Tree for practical input and output use cases.
@TheTotalGeek
@TheTotalGeek 11 жыл бұрын
Hey Derek, your videos are terrific. There is a real lack of good tutorials like this in the BBB community at the moment, so this is greatly appreciated.
@sarveshk09
@sarveshk09 11 жыл бұрын
You are awesome Dr. Molloy!!! Thanks a lot for the Beaglebone tutorials! I am following all of your Beaglebone tutorials and finding them extremely helpful in learning Beaglebone Black.
@EngineeringVignettes
@EngineeringVignettes 11 жыл бұрын
This is a sorely needed tutorial - much thanks for putting this out for the BBB community. The supplied GPIO map tables are icing on the cake. Thank you.
@celio04
@celio04 11 жыл бұрын
Great Work Derek. I am starting with Beaglebone and the videos are very instructive.
@CBGoodBuddy
@CBGoodBuddy 11 жыл бұрын
This video is awesome. Other websites and blogs I found were just snippets of random information, but your video puts it all together into something that approaches making sense. (as much as the device tree and pin mappings can make sense!)
@pantoniou1
@pantoniou1 11 жыл бұрын
Derek, cool informational video. I'm the guy responsible for your woes so here's something that will be in the next release and will help you guys out: firmware/capes/BB-GPIOHELP-00A0.dts This will take care of both the pinmuxing and the GPIO configuration bits. Have fun.
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Thanks Pantelis - Yes, I will have to do a video on that too. I used the button and LED as examples of inputs/outputs. In the follow on video (already there) I use the GPIOs for driving an EasyDriver stepper motor controller board.
@MyRadDesign
@MyRadDesign 10 жыл бұрын
Derek: Thanks for your entire series on this technology. One suggestion is that you use different terminology in regards to 3.3V tolerant or 5V tolerant... This terminology is typically used in the context of a microcontroller or other logic device that is powered by 3.3V. If it is not 5V tolerant, damage to the 3.3V device would occur if it was to be connected to signals that provide 5V as their logic high. 5V tolerant parts while still operating off 3.3V power supplies are not damaged (tolerate) the 5V signals that may be connected to them. You are quite correct that the BBB is not 5V tolerant. Keep up the great tutorials.
@eskibrew
@eskibrew 11 жыл бұрын
I've found the answer in the TRM on page 747 (section 9.2.2). Bit 5 is (RXACTIVE) and it says: "Input enable value for the Pad. Set to 0 for output only. Set to 1 for input or output." Presumably then, writing "in" to the GPIO direction file does not set it as an input unless bit 5 of mode is also set. Very useful to know. Also, regarding fast/slow bit 6 (SLEWCTRL). According to the TRM (same page) this sets the slew rate of the pin - presumably when set to fast, the pin drives more current.
@pyromagi5892
@pyromagi5892 11 жыл бұрын
Thank you Derek, well explained. I now have made my two on blobs from this video, giving me 65 GPIO pins im now using to control 65 different relays :D I also made som adjustments so that everything is setup when the BBB boots up.
@ricardodasilveira646
@ricardodasilveira646 10 жыл бұрын
I also want to thank you for putting up this great tutorial. It helped me much getting started. Great job!!! I hope more videos
@frankshen2739
@frankshen2739 11 жыл бұрын
Thanks Derek. I enjoy watching you videos!
@JanHorcicka
@JanHorcicka 11 жыл бұрын
Thank you very much Derek. Those are brilliant videos. I enjoy watching every single one of them. Thank you very much for sharing your knowledge :)
@SurElliott
@SurElliott 11 жыл бұрын
Great tutorial. Now all I need is a tutorial of this quality dealing with the PRU-ICSS.
@SamFugarino
@SamFugarino 11 жыл бұрын
Thank you. Very easy to follow, but detailed.
@ryanbass2027
@ryanbass2027 9 жыл бұрын
Thanks Derek! Very useful...much appreciated
@alamuru420123
@alamuru420123 11 жыл бұрын
Wish this video was available 2 weeks ago, you could have saved me a lot of grief :(
@jrblackify
@jrblackify 9 жыл бұрын
Professional video editing! Very nice.
@tcbetka
@tcbetka 11 жыл бұрын
Wow...seems like the new Beaglebone has increased a level in terms of using gpio pins. I thought I understood it after watching your original version a few months back, but now I'm not so sure about this one. I'll have to go through this one again (and again...and maybe again).
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Yes, I think the syntax that you add to uEnv.txt (from memory) for your BB-GPIOHELO-00A0 is: optargs=capemgr.extra_override=BB-GPIOHELO:00A0 Also, I think you can leave 00A0 out of your echo call to slots and in the uEnv.txt file too.
@ReneARobichaud
@ReneARobichaud 11 жыл бұрын
Great video! I'm new to beaglebone black but this video is a time saver! 1 issue I had: DM-GPIO-Test.dts would not compile until I removed all comments from fragment@0 overlay section. I'm not sure why.
@Futterama
@Futterama 11 жыл бұрын
Great video, I gotta try this on my original BeagleBone running the 3.8 kernel. Regarding the 100ohm resistor to protect the input, if something went wrong, the 100ohm would allow 33mA to flow through it (at 3.3V), and since this is several times more than the maximum allowed current for the pins, I would assume that 100ohm is not enough for protecting the I/O. I would suggest 1k since this gets you below the 4-6mA output source capability of the pins in case of shorting an output pin to ground.
@jordanw5163
@jordanw5163 11 жыл бұрын
This was filmed on my birthday
@thetedsingh
@thetedsingh 10 жыл бұрын
It would be great if you could put sections/times into the "Show More" information area, so that can see where certain topics are discussed - would make it easier to skip to sections that we are interested in.
@eskibrew
@eskibrew 11 жыл бұрын
agreed - but that is done with bits 4 and 3 of mode. My question relates to bit 5 of the mode selection which is entitled "receiver active".
@yogeshasati6210
@yogeshasati6210 11 жыл бұрын
hi Derek , u r awesome...fantastic video......u r my teacher....
@bobperet
@bobperet 11 жыл бұрын
Great video Derek. I now have lots of blinky lights! I would now like to read an analog input. Looks like the GPIO modes can't be set via the device tree overlays :-( If you get bored, maybe you could post how to configure and read one of the ADCs. Keep up the great work!
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Thanks, I noticed this too at one stage, but only if I sftp'd the files to my Beaglebone. If I used git clone directly on the Beaglebone I had no difficulties. It appears that a few escape characters are introduced at the end of the comment lines but I have no idea why this is happening.
@alamuru420123
@alamuru420123 11 жыл бұрын
Brilliant explanation though, thanks! Keep the videos coming!
@jwilliams8210
@jwilliams8210 2 жыл бұрын
Derek - Regarding the 100 Ohm resistor protecting the input GPIO_15 (around 8:25 or so), under NORMAL circumstances, and assuming the applied voltage is always between 0 and 3.3V, is the 100 Ohm resistor really necessary? Asked a different way, it is not as though that input GPIO circuit would draw/sink 33 mA - minus the small amount of current through the 10K resistor(this is actually a question to you, not a declaration as I am not sure ;-). Great video BTW...
@ryanbass2027
@ryanbass2027 9 жыл бұрын
Quick question : At 31:14, the GPIO 60 pin is tested for direction, and the system responds with an "in". Why would it return the direction of this pin as an "in" when it had already been setup as an output? Thanks
@RajahChandrasekhar
@RajahChandrasekhar 11 жыл бұрын
Wonderful collection, very professional videos and very illustrative examples. Are you planning to a serial driver example? I want to interface the beaglebone to a 8-bit UART. Thanks.
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Thanks Pantelis, Derek.
@qzorn4440
@qzorn4440 Жыл бұрын
Some wonderful BBB GPIO information. I would like to use the Orange Pi-5 GPIO PWM pins to control the Pan/Tilt servo motors. Little OPi5 info! This video will help?? 😎 Thank you. The new technical manual is over 5,000 pages and look on P1515 control_module registers.
@krsheshu
@krsheshu 10 жыл бұрын
Hi... Thank you very much for this tutorial....
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Hi, I had a look at it is very impressive. It looks perfect for a media center project! I haven't seen too many boards with SATA for that price... I'm assuming it is all open? If so, it looks like a great alternative to the PI for Media Center applications!
@Rafi_tarane
@Rafi_tarane 4 жыл бұрын
Hey Derek, I guess there is some mistake in the comment at the timestamp 25:34, modes (pulldown, pullup) is mistakenly mentioned under the wrong label. This should be as: INPUT GPIO(mode7) 0x27 pulldown 0x37 pullup and OUTPUT GPIO(mode7) 0x07 pulldown and 0x17 pullup
@kapoorhemant
@kapoorhemant 10 жыл бұрын
Thanks for the video Derek, it is quite informative, however I am bit confused as what was the use of device tree in this tutorial.
@GooGouli81
@GooGouli81 11 жыл бұрын
I've come across your channel recently and found it very interesting. Are you planning to do tutorials on beagleboard-xM as well?
@eskibrew
@eskibrew 11 жыл бұрын
Another great tutorial Derek. I've been playing with device tree overlays on the BBB for over week now but still learned something. Can you clarify the function of the mode bit 5 (receiver active) - is it necessary to explicitly enable this if the pin is used for input or does writing "in" to the direction file of the relevant gpio effectively do the same job? Regards Martin
@rolandkoluvek2986
@rolandkoluvek2986 11 жыл бұрын
aviatorRHK, I noticed that the transistor is installed backwards. Google 2N2222, and you will find several 2N2222 PDF's, Transistors will work with their emitter collector reverse, only the beta is low.
@HobbyBots
@HobbyBots 11 жыл бұрын
Awesome video, thank you.
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Thanks - Yes indeed, a 100 ohm resistor on its own is not really a good level of protection. I will try the 1k option to see if it still provides a stable high/low input.
@parikshitsagar
@parikshitsagar 11 жыл бұрын
Thank you Derek for the video. I would like to ask you to do the accelerometer I2C programme on BBB. Thanx in adv.
@cmacia06
@cmacia06 11 жыл бұрын
Do I really need to create the firmware? Could I just export the appropriate gpio pin with the same effect?
@r.dustinkahawita9860
@r.dustinkahawita9860 10 жыл бұрын
I have the exact same question. Wouldn't it be possible to carry out the exact same procedure via the export function in user-space without the need for a device tree overlay?
@gsansoucie
@gsansoucie 11 жыл бұрын
Derek, great video. I have the latest flash image and noticed that I have a /sys/devices/bone_capemgr.8 while you have /sys/devices/bone_capemgr.9. Is this a version or a random number? (I see a post online that can go either way). If it is a version, how does one go about upgrading it? Thanks
@DigishPandya
@DigishPandya 11 жыл бұрын
Excellent video i loved your narration and way you cover the topic. do you have any video example showing DC motor interfacing to beagle bone black somehow i could not find any appropriate tutorial for that.
@MrJimmyJimJames
@MrJimmyJimJames 11 жыл бұрын
Thanks for the info, as I'm new to the 3.8 kernel Device Tree thing. So, to enable one of the provided "virtual capes" from the firmware/capes directory, do we just do this? echo BB-GPIOHELO-00A0 > /sys/devices/bone_capemgr*/slots I also read that to make it permanent, we have to add it to uEnv.txt file on the properly mounted boot volume. Is that correct?
@王鵬程-y6r
@王鵬程-y6r 11 жыл бұрын
Thank you! This video is very helpful for me. I have a very stupid question? where can I find the in the video 05:52 place "Beaglebone Black P9 Header", this table.
@gianlucamarioghisleni3699
@gianlucamarioghisleni3699 11 жыл бұрын
Thank you for this video. Now I understand why /dev/ttyO2 does not work with LCD3
@Ishihok
@Ishihok 11 жыл бұрын
Thankies much for the video. I could not find the link to the fills with the data about the pins on your site. could you link me? thanks.
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
There shouldn't be much of a difference between my IC2 video on the Beaglebone white and getting it to work on the Beaglebone black. I'm not sure it would need to be redone. Derek.
@oromoiluig
@oromoiluig 10 жыл бұрын
Hi thank you for the great tutorial. At 31:14 , why is the direction of GPIO60 set to "in", when it was set to be "out" in the overlay file?
@bluehornet6752
@bluehornet6752 7 жыл бұрын
Giulio Moro Good question, I wonder if he used the wrong address (0x078) for that pin? Was it supposed to be 0x087 maybe, and he transposed the two values?
@bluehornet6752
@bluehornet6752 7 жыл бұрын
No, I think the address is right, as seen at 27:46. Interesting...
@locomotionlab
@locomotionlab 11 жыл бұрын
Are you referring to the next BBB angstrom release? When is the next release coming up?
@ytalanwms
@ytalanwms 10 жыл бұрын
Derek - Thanks so much for your video efforts - I have been looking for instruction on receiving a string (8 bytes) of data from the USB0 port on the beagle bone - Searched everywhere. I'm using RFID that sends the data at any point in the program. Can you tell me if your book(s) articulates that and would help me do the following: get uart data into a file based on an interrupt?
@Lizardomostvaliant
@Lizardomostvaliant 11 жыл бұрын
Hi Derek, informative video. I'm having a problem using the device tree compiler which I downloaded using apt-get install device-tree-compiler on ubuntu 12.04 ARM. It doesn't recognise --@ as being a valid input. It gives: dtc: invalid option -- '@' Do you have any suggestions, is there an alternate version of dtc to use?
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Thanks for that.
@igor_tomljanovic
@igor_tomljanovic 11 жыл бұрын
Thank you!
@azurewang
@azurewang 11 жыл бұрын
Hi Derek, You set the direction of GPIO_60(LED) to "out", but after you export it to filesys, it still shows "in". I tried to alter the direction in filesys, and it has no effect in cat $PIN. So filesys VS capMgr, who should we rely on?
@imanyazdansepas4217
@imanyazdansepas4217 10 жыл бұрын
Hi Thank you for your informative video. I'm wondering do you have any tutorial for setting up LCD? Thank you.
@petermills9358
@petermills9358 11 жыл бұрын
Hi Derek, Thanks for the great video. I am getting stuck trying to compile the .dts file. I get the following error: Error: DM-GPIO-Test.dts:35.1-3 syntax error FATAL ERROR: Unable to parse input tree I know others have posted on this. I have tried all the solutions that have been offered: using git to download the files to my BBB; removing comments from the first fragment. I don't think I need the dtc patch because I am using the latest Angstrom distro. Any ideas? Thanks for any help. Peter M
@mfcsdm6879
@mfcsdm6879 11 жыл бұрын
Thank you Derek, why I can export the gpio60 even without loading the dtbo file, and why, after loaded dtbo file, the gpio60 pin direction is "in" ??
@simonppg
@simonppg 9 жыл бұрын
Derek Molloy I read your p9 table for the pins of BBB tring to make a test for ADC but I can't find how to configured because AIN0..AIN6 has't pin number and add/offset, can you post how to do it from terminal?
@neoxnitro81
@neoxnitro81 11 жыл бұрын
Hi, It is possible to set the Pull up/down with the /sys/class/gpio/gpioxx acces ? thanks
@hongnhatbkhcm
@hongnhatbkhcm 11 жыл бұрын
Thanks for ur useful GPIO tutorial, I would like to ask about using interrupt event of GPIOs and Uart. Can you help me :)
@bunsenmcdubbs
@bunsenmcdubbs 11 жыл бұрын
Thank you!!!!!
@JaySharma1994
@JaySharma1994 11 жыл бұрын
I have been trying to write device drivers and modules for the beaglebone but due to lack of kernel headers the Makefile is not working. I tried installing it by using sudo apt-get install kernel-headers but all in vain. Please help me out..
@zombieregime
@zombieregime 11 жыл бұрын
i cant seem to find those PDF tables shown in the video. anyone have a direct link?
@FungSit
@FungSit 8 жыл бұрын
How to run the cpp program after BBB is powered on by itself? Using some kind of batch file? Please help..
@agnichatian
@agnichatian 6 жыл бұрын
Does this apply to modern BBB from 2018 with Debian 9 ?
@devilalwayscry
@devilalwayscry 7 жыл бұрын
Please update the methodology to disable HDMI on latest kernel and other dts slots configuration, where bone_capemgr is already gone.
@MsBadders
@MsBadders 11 жыл бұрын
Thanks
@JohnathanBreaux
@JohnathanBreaux 11 жыл бұрын
Same question regarding 8 to 9.
@parikshitsagar
@parikshitsagar 11 жыл бұрын
I was not able to read analog voltages in terminal.
@zhitailiu3876
@zhitailiu3876 7 жыл бұрын
hi, All! Just learning BBB through the book exploringBB! I got a question here. It seems that since v4.4.x in debian, there is no longer slots interfaces. So how shall I do/modify to follow the related materials on chp6 of the exploringBB? Will there be an update on the page exploringbeaglebone.com/chapter6/ ? Anyway, this book is really great!
@codemasterz6074
@codemasterz6074 6 жыл бұрын
Unfortunately the tutorial does not work for Debian 6.3 kernel 4.14.71 - device tree is quite different from the one in the video. Well .. 5 years have passed I guess :)
@teclordphrack2
@teclordphrack2 11 жыл бұрын
hmmmm.... when I try to do the git clone ....boneDeviceTree.git I get an error. "Error while accessing ....... .git/info/refs fatal: H T T P reqest failed" Not sure if this is on my end or not. New to linux, embedded systems, and BBB.
@Lizardomostvaliant
@Lizardomostvaliant 11 жыл бұрын
Found a solution. The dtc on apt-get isn't the latest. Followed the instructions at adafruit on downloading and building one from source: learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/compiling-an-overlay Look to the bottom of the page it specifically addresses this issue.
@yogeshasati6210
@yogeshasati6210 11 жыл бұрын
please can u upload some video.related compiling uboot and kernel ,file sys for.setting environmental from uboot variable for BBB.
@alexbarraza99
@alexbarraza99 11 жыл бұрын
como podemos aprender leds
@PIOR21
@PIOR21 11 жыл бұрын
and for windows?
@GeomancerHT
@GeomancerHT 11 жыл бұрын
I had a similar problem with the git clone command, the issue is with SSL, you could try with the following command, "git config --global hxxp.sslVerify false" (cannot write h t t p under comments) I also followed the really nice tutorial Derek did for upgrading the git version, as the shipped with the BBB is really old, you can look it at Derek's web under derekmolloy.ie/building-git-beaglebone/
@soca3792
@soca3792 6 жыл бұрын
I can't clone it "Could not resolve host: github.com" please helpppppp me TwT
@SergioAlejandroSalinas
@SergioAlejandroSalinas 5 жыл бұрын
It may be a problem with the DNS, try adding nameserver 8.8.8.8 and nameserver 8.8.4.4 to the file in /etc/resolv.conf
@iAnguel
@iAnguel 11 жыл бұрын
Thanks for the good video! But how could they make it that complicated :-(
@MohannadAlomari
@MohannadAlomari 11 жыл бұрын
Ya, I have the same issue here, HELP please !
@JensonPais
@JensonPais 11 жыл бұрын
Derek, are you on twitter ??
@nigelbrown1949
@nigelbrown1949 11 жыл бұрын
Google teknoman117 and hcr-sr04
@DaveCovert
@DaveCovert 11 жыл бұрын
I think you should publish a Bitcoin payment address so those of us who would like to send you a gratuity for your excellent work can do so.
@johanneswestman935
@johanneswestman935 2 жыл бұрын
Too bad it's on a beagle and not a generic linux distro.
@emmaggarvey
@emmaggarvey 4 ай бұрын
Danny that accent is horrendous
@jordanw5163
@jordanw5163 11 жыл бұрын
This was filmed on my birthday
@aohzaay
@aohzaay 11 жыл бұрын
Excellent video. Thank you.
Beaglebone: An I2C Tutorial - Interfacing to a BMA180 Accelerometer
47:28
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
Beaglebone: GPIO Programming on ARM Embedded Linux
46:06
Derek Molloy
Рет қаралды 107 М.
KiCad 7 STM32 Bluetooth Hardware Design (2/2 PCB) - Phil's Lab #128
2:56:53
IR Remotes & Microcontrollers - Arduino & ESP32
1:31:50
DroneBot Workshop
Рет қаралды 238 М.
Beaglebone: Adding USB Wi-Fi & Building a Linux Kernel
56:44
Derek Molloy
Рет қаралды 84 М.
Digital Electronics: Overflow, Overflow Detection and Underflow
28:29
Colossus - The Greatest Secret in the History of Computing
1:00:26
The Centre for Computing History
Рет қаралды 947 М.
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН