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
PWM Initialization Produces RuntimeError: Problem with cape manager #114
Comments
I'm wondering where the source for device tree overlay comes for the 4D LCD cape that is being loaded:
I'd like to determine if this is it: Could you go through the install steps for bb-overlay? |
I already had Robert C Nelson's bb.org-overlays installed. Reinstalled, rebooted. Tested PWM with and without LCD touchscreen, tested with and without BB-PWM2 echoed to /sys/devices/platform/bone_capemgr/slots. Same results as before. |
I'm having the exact same problem. I have no cape attached (bare beaglebone black), only PWM gives out this error. |
@sohotaling @xiiihyou13: Run the following commands, and paste the output ( # Install strace somehow (not sure what the package management situation is on kamikaze)
# on Debian it'd be
sudo apt-get install strace
sudo strace -o trace.txt python3 # Or python from Adafruit_BBIO import PWM
PWM.start('P8_13', 50, 1000, 0)
# press Ctrl-D Then upload the contents of Per @MatthewWest:
|
@pdp7 I'm not quite familiar with github. is this correct? https://gist.github.com/xiiihyou13/e3caa6f5921bc633167261940eda8fe4#file-trace-txt |
@pdp7 @MatthewWest I've used strace and the first two lines of Python commands above, as well as defunkt's handy gist command to generate then upload some txt files. They can be found in my gist repo. Both tests were run with my The first problem to jump out at me in each test is that Python is unable to find a series of files: The Bone tries multiple times to access the above files - checking the directories manually confirms their absence. Does this mean there's a problem with my Python installation? Is there a method for testing and/or repairing it? Cheers, Sam |
@sohotaling Those Please run this:
Then enter this:
|
Could you please specify which image and kernel your BeagleBone is running?
I've recently published Adafruit_BBIO v1.0.0 to PyPi. Pleas update to make sure you are using it:
Finally, I should have asked you to run strace with the option to follow child processes. Please run this:
Then enter this:
|
Relevant part of the gist starts at line 2122. |
Just kidding, all the lines start with the same number. The |
I am having the same problem on my beagle bone green wireless. What I am currently running: BeagleBoard.org Debian Image 2016-09-18 I will experience the problem. However, I can connect to my BB through the access point via WIFI. The lights on the board will go from "dancing" in unison to D4 being lit and D2 blinking in a heartbeat fashion. Then I can run the exact same program using PWM and it will be completely fine with no errors. The problem appears that the device tree overlay is not added to the cape manager but after accessing the BB thru the access point it becomes added. I know this because using cat /sys/devices/platform/bone_capemgr/slots proves it. I'm not sure what the actual problem is but I just use this as a work around. |
@MatthewWest I see several instances of |
@pdp7 @MatthewWest Where do we stand on this? I've read these error messages a couple times now, and I'm still unsure of the root of the problem, or how to fix it. How do we proceed from here? |
@pdp7 Sorry, I've been a bit busy with schoolwork. The relevant section of the gist starts here. I believe that I've figured out the problem — the PWM implementation of this library for BeagleBone 4.1+ requires that a universal cape be present. Most of the time, this works really well—universal capes allow all the functions to be used without explicitly enabling them at boot, just requiring pin-muxing. The downside is that if a hardware cape uses pins which conflict with universal cape pins, the universal cape won't be loaded, and it can't be used to enable functionality. Unfortunately, this isn't a simple fix. Here's a comment from the author of universal overlays on their pros and cons - one of the cons is that they are not as flexible. The fix would involve 1 of 2 things. One option would be to make a custom version of the universal overlay, with the offending pins removed. The other option would be to make our own overlays for each pin, and load / unload them as needed from our library. I don't have time to work on this at the moment, since it's the middle of an academic term. Hopefully I've put some useful information here. |
Thanks for your insights, @MatthewWest! |
As Drew says, thanks, @MatthewWest. I'll try loading some universal capes with and without the touchscreen, and may need to dump the touchscreen altogether in favor of standard HDMI output and a USB hub for input. Really appreciate the help from both of yall @pdp7 |
@sohotaling are you still experiencing this issue? |
@sohotaling can this issue be closed? |
@pdp7 Sorry for the slow response - I too have been able to dedicate little time to sorting my BBB out. Yes, I'm still experiencing this issue - I'm going to start testing this on earlier versions of Debian Linux and see what happens. Kind of stuck :/ |
@sohotaling Thanks, yeah, that would be useful if you could contrast results using an earlier version |
@sohotaling any update this issue? were you able to make any progress? thanks |
Please re-open if issue still exists |
I am experiencing this issue still. Would like to request this issue to be reopened please. I am assuming only an admin can do this. Or should I file a new issue? Update: saw a note that I should post in the adafruit forum. Will proceed to do so |
@elfgoh please open a new issue and reference this issue in the description. I monitor both the BeagleBone forum on forums.adafruit.com and this GitHub repo. For an issue specific to the Adafruit_BBIO library, I do prefer creating a GitHub issue in this repo as it easier to keep track of than an Adafruit forum post. Thanks. |
I'm using a BeagleBone Black to control a stepper motor, three limit switches, a relay, and a touchscreen (4D Systems 70T, see ). Although the LCD touchscreen is a cape, plugging into all 46 pins, I've used an Adafruit proto-cape, a pair of stacking headers, and some rudimentary soldering (see images below) to get the IO I need from the BBB while allowing the LCD cape's signals to pass unhindered. Obviously, I took care not to use any pins required by the LCD cape.
When the LCD cape is not plugged into the BBB, Adafruit_BBIO.PWM's features work - my stepper motor behaves as expected. When the LCD cape is plugged into the BBB, regardless of whether or not the passthru proto-cape is present, running a line like
PWM.start('P8_13', 50, 1000, 0)
producesRuntimeError: Problem with the cape manager
. This seems only to occur with PWM - GPIO works fine - but occurs with all PWM pins not used by the LCD touchscreen (I've avoided testing pins used by the touchscreen while it's plugged in).Checking in on the loaded device tree overlays with
cat /sys/devices/platform/bone_capemgr/slots
, we see four empty slots when the touchscreen is absent, and the following output when just the touchscreen is present:0: P---L- 0 4D 7.0 LCD CAPE- 4DCAPE-70T ,00A3,4D SYSTEMS ,BB-BONE-LCD7-01
1: PF---- -1
2: PF---- -1
3: PF---- -1
My understanding is that P8_13 is driven by EHRPWM2. I attempted to ensure that this was activated by running
echo BB-PWM2 > /sys/devices/platform/bone_capemgr/slots
, which returned no errors.cat /sys/devices/platform/bone_capemgr/slots
now yields the output:0: P---L- 0 4D 7.0 LCD CAPE- 4DCAPE-70T ,00A3,4D SYSTEMS ,BB-BONE-LCD7-01
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 1 Override Board Name,00A0,Override Manuf,BB-PWM2
,but attempting the above line yields the same result:
RuntimeError: Problem with the cape manager
.What's going on, and how can I fix this? Is the device tree overlay loaded from the cape's EEPROM interfering with Adafruit_BBIO's device tree bindings?
Thanks for your help.
System details:
Platform: BeagleBone Black, Rev. C
OS: Debian GNU/Linux 8.6 (jessie) on SD card
Kernel: 4.4.9-ti-r25
Python Version: 2.7.9
Adafruit_BBIO version: 0.0.30
Adafruit_BBIO.PWM version: 0.0.20
The text was updated successfully, but these errors were encountered: