-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot set any pins GPIO.IN #227
Comments
@StokesMIDE your version of u-boot in the eMMC is too old, thus blocking all the new features built into the newer U-Boot..
Run this command to surgically remove the old version of U-Boot from the eMMC:
Then enjoy all the new gpio wonderfulness. Regards, |
@RobertCNelson - That seemed to work on a fresh image, although those two lines in the version info didn't change. GPIO input continued to work after I disabled the HDMI and audio. The problem came back after I then attempted to enable UARTs 1, 4, and 5. Since your solution initially worked, I'm not sure if this should be considered a separate issue. Version info dump after last attempt:
In addition to uncommenting the lines to disable audio and video, here's what I added to the end of /boot/uEnv.txt to enable the UARTs:
Note that this is a fresh image of bone-debian-9.3-lxqt-armhf-2018-01-21-4gb, using kernel 4.9.77-ti-r92, with all packages upgraded. The |
@StokesMIDE ah, then we might be dealing with a fat partition: What does lsblk show? Regards, |
(edit: added filesystem column) |
Weird, i'd erase the eMMC.. Regards, |
Okay, I erased the eMMC, but it did not do any good. However, I found a solution that seems to work. I'm hesitant to call it a real fix; it feels like a hack, generates some warnings, and I'm not sure if it itself fixed things or if it is a combination of everything that makes things work. Anyway, I got the UARTs and GPIO.IN working by adding the overlay
This was using bone-debian-9.3-lxqt-armhf-2018-01-21-4gb, kernel 4.9.77-ti-r92, booted from SD. As I said, this combination of overlays generates warnings about pin reassignment on boot (seen on ttyO0), but the UARTs and the GPIO inputs I need all seem to work. I can probably get rid of the warnings by rolling my own version of the I have to confess that I don't fully 'get' the structure of overlay files. Is this a viable fix, or is this a virtual Rube Goldberg machine with its own issues that simply have yet to be seen? |
@StokesMIDE don't add cape-universal overlay directly. In /boot/uEnv.txt make sure these are set:
Then un-comment which block you'd like to disable:
Finally, once booted, use "config-pin" to set the uart pin's for uart1/uart4/uart5.. Regards, |
@RobertCNelson They were. These are the relevant lines from my /boot/uEnv.txt:
These were uncommented before I tried adding |
Correct, once you "set" it to load a custom overlay (UART) cape-universal will go bubye.. But you don't need to have it load your UART overlay, because when you set:
The uart is actually enabled, you just need to run:
and uart1 will just work, (do the same with uart4 & uart5 pins) Regards, |
@RobertCNelson Is there a way to set up flow control via I really need all this persistently configured; the BB will be running headless and (mostly) unattended. Solutions that use scripts to execute |
Okay, yeah that's a special situation, i'd just add the gpio's you need to the uart overlays today. I'm working on a better fix for down the road, but it's not ready today.. Regards, |
@StokesMIDE would that suggestion by @RobertCNelson work for your situation? |
@pdp7 no what @StokesMIDE want's to relies on the Cape Universal Rewrite: Here's the milestone i quckly put up.. https://github.com/beagleboard/bb.org-overlays/milestone/1 Regards, |
@StokesMIDE are you able to achieve what you need using the custom overlay? |
@pdp7 No, my attempted overlay didn't work. That's really an issue with my understanding of overlays, though, not anything specific to adafruit-beaglebone-io-python. @RobertCNelson Even though I shouldn't be explicitly applying |
Incidentally, after moving my SD to a different BBB, I can confirm that updating u-boot on the eMMC was indeed a necessary step. That might be helpful to others having (different) GPIO issues. |
@StokesMIDE I chatted with @RobertCNelson about this and I believe it is an acceptable solution for you to edit Are your needs satisfied with the custom |
@StokesMIDE is it OK to close this issue? |
The cape-universalh may conflict your other device tree overlays, so I've edited the cape-universalh-00A0.dts and put only the pins I wanted to use, and it worked: |
Attempting to set any GPIO pin to
GPIO.IN
raises a ValueError.Example:
All available GPIO pins were tried; attempting to set any of them to
GPIO.IN
failed.GPIO.OUT
appears to work, however.Originally attempted with a fresh image of bone-debian-9.3-lxqt-armhf-2018-01-21-4gb (kernel 4.9.77-ti-r92), with all packages upgraded. The next set of attempts were done after updating the kernel to 4.14.15-ti-r29; the results were the same.
The result was the same using Adafruit-BBIO-1.0.9 (the pre-installed version) and after updating to Adafruit-BBIO-1.0.10. Running Python with or without
sudo
made no difference.System info (after last attempt):
/boot/uEnv.txt (after last attempt):
This is basically a duplicate of #206, but I was asked (by @pdp7) to create a new issue.
The text was updated successfully, but these errors were encountered: