-
Notifications
You must be signed in to change notification settings - Fork 220
Closed
Description
-
Platform/operating system: Beaglebone Black rev C, BeagleBoard.org Debian Image 2018-01-28, no capes.
-
Python version (run
python -version
orpython3 -version
): Python 2.7.13 -
Error message you are receiving, including any Python exception traces:
Our MWE:
import Adafruit_BBIO.PWM as PWM
PWM.start("P9_14",0,10000)
on the first run after reboot, would fail with:
RuntimeError: Problem with a sysfs file
The second (and all subsequent) runs would work.
Here is the relevant sequence in strace
:
stat64("/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3/pwm0", 0xbe8dcd28) = -1 ENOENT (No such file or directory)
stat64("/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3/pwm-3:0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3/pwm-3:0/period", O_RDWR) = -1 EACCES (Permission denied)
The code is failing the stat on line 435, going successfully through the stat in line 441 (middle line), then failing at line 515.
I wondered if there was a delay in udev's operation, I added a 100ms delay (pull request pending) which resolved this issue. I don't think this is the best solution, but it hints at a solution.
Metadata
Metadata
Assignees
Labels
No labels