On Fri, Jan 15, 2021 at 9:25 AM Steve Lentz <
stl...@gmail.com> wrote:
>
> OK, 3 of 4 PWM pins are working, but still no luck with P8_13.
>
> I can see that Adafruit_BBIO is writing values into /sys/class/pwm/pwm-7:1/duty_cycle but no output is being generated.
>
> debian@beaglebone:/sys/class/pwm/pwm-7:1$ cat duty_cycle
> 200000
> debian@beaglebone:/sys/class/pwm/pwm-7:1$ cat period
> 500000
>
> Pin 8_13 can still be used for GPIO. I have not dug further into the device files. Does this seem like a hardware or software issue? Should I reinstall the base image, accept that the board is flaky, or is there some other possible solution?
>
> Also, the PWM frequency is fixed at 2000 Hz (period = 500000 ns). Is this intended? I can work with 2000, so this is more out of curiosity.
>
> Python returns the following errors:
>
> >>> PWM.start(pin3,50,1000)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> RuntimeError: Problem with a sysfs file
>
> >>> PWM.set_frequency(pin3,1000)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> RuntimeError: Could not write to the frequency file
>
> Attempting to write into the period file directly returns the following:
>
> debian@beaglebone:/sys/class/pwm/pwm-7:1$ sudo echo 400000 > period
> [sudo] password for debian:
> echo: write error: Invalid argument