GPIO ports stop working

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
breter65
 
Posts: 3
Joined: Fri Nov 08, 2013 4:34 pm

GPIO ports stop working

Post by breter65 »

Hi

I am running a Beaglebone black with Debian release 7.5 Wheezy. I created a program in python that operates LEDs connected to the GPIO ports based upon user input from the keyboard. Everything was working great, I made some code changes and it has since stopped working. Now your probably thinking the code changes caused the problem, so did I, so I took and ran a very basic program (code below) that I know works and has worked in the past, but the LED's still do not light up. Verified the LED's are working with an alternate power source. Now I have seen the similar issue running on Ubuntu 14.10 on a different beaglebone black, which is why I switched to this Beaglebone black and installed debian thinking there was a hardware issue. I am at a loss as what to try next.


#!/usr/bin/python
import Adafruit_BBIO.GPIO as GPIO
import time

print "BeagleBone Flasher\n"

while True:
GPIO.setup("P8_10", GPIO.OUT)
GPIO.output("P8_10", GPIO.HIGH)
time.sleep(1)
GPIO.output("P8_10", GPIO.LOW)
time.sleep(1)


Thanks for you Help
Bret

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: GPIO ports stop working

Post by adafruit_support_rick »

Do you have current-limiting resistors wired in series with the LEDs?

breter65
 
Posts: 3
Joined: Fri Nov 08, 2013 4:34 pm

Re: GPIO ports stop working

Post by breter65 »

Yes they are 338 ohm. Just to recap I started this project with a BBB running ubuntu 14.10 everything was working great then the led's stopped working, I went to another BBB that I had installed Debian on and ran my programs and everything worked for a while then stopped again. So I borrowed a known good BBB from friend and installed Debian identical to my BBB and again LED's did not work. So I felt fairly confident it was not damaged hardware. So I went back to my BBB loaded with Debian and ran the scripts again no luck initially, but the second time I ran the blink.py script it worked, so I went to my more complex program and ran it and everything worked, LEDs came on no problems I put a DMM on the pins associated with the LED and the voltage was 0v when it was off and 3v when it was on as you would expect. I do not mean to be overly verbose I just want there to be a good history of what has been done so far. If things change from this current state I will update this thread.

Thanks
Bret

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: GPIO ports stop working

Post by tdicola »

Be careful, a 338 ohm resistor is allowing almost the maximum amount of current that a BBB pin can source. Assuming a 1.2 volt drop from the LED, you'll get about 6 mA of current to the LED. Unfortunately the BBB only supports about 6-4mA on each pin, check out this post for details: https://groups.google.com/d/msg/beagleb ... v5xKW3RvUJ

Also are you using the official Debian image from http://beagleboard.org/latest-images ? I mention it because the kernel support for the BBB is under a lot of development and really only the 3.8 series kernel is stable and supported by the BBIO library (later kernels don't have device tree overlays support which is required). If you run 'uname -a' is the kernel a 3.8 version?

Another thing to check is the device tree, since it impacts how the pins are used on the BBB. If you're running other programs or even have run other programs they might have changed the device tree and disabled that pin as a GPIO device. Something to try is switching to another pin to see if it works again. Also try grabbing a list of all the device tree overlays that are loaded to see if any of them might be changing that pin. Check out the device tree overlay guide here for more info, in particular the page on exporting and importing overlays shows how to list them by running cat on the slots file in the cape manager directory: https://learn.adafruit.com/introduction ... e/overview

breter65
 
Posts: 3
Joined: Fri Nov 08, 2013 4:34 pm

Re: GPIO ports stop working

Post by breter65 »

To answer you questions I went with a larger resistor so as not to max out the current, I verified that I am using the latest version of debian with a 3.8.13-bone50 kernel. Regarding the device tree overlay I have never changed any to my knowledge in fact I was not really aware of them until you mentioned them. I looked at the link that you sent regarding the overlays and looked at the slots file and it was the same as the defaults in the tutorial on "exporting overlays". Is there a way to inadvertently change the overlays? Once the BB is power cycled do the overlays revert to a default setting? It appears that the tutorial was indicating that.

Thanks Sincerely
Bret

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”