On Fri, Jan 15, 2021 at 9:25 AM Steve Lentz <stle...@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

That's invalid, "sudo echo....."

sudo sh -c "echo '400000' >> ./period"

Besides, pwm should be "root:gpio" permissoins..

Regards,


--
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYj8yE89VAqhdrkephL2TKGrX6Csjbou0Noak7ke41xQEA%40mail.gmail.com.

Reply via email to