root@beaglebone:/sys/devices/ocp.3/pwm_test_P9_31.13# echo 1000000000 > period
root@beaglebone:/sys/devices/ocp.3/pwm_test_P9_31.13# echo 1000000001 > period
bash: echo: write error: Numerical result out of range
The value is in nanoseconds, so that gives a minimum frequency of 1Hz for PWM on beaglebone black.
Also note that it won't let you set the period lower than the duty cycle setting (which we should really call the pulse width instead):
root@beaglebone:/sys/devices/ocp.3/pwm_test_P9_31.13# echo 2000 > duty
root@beaglebone:/sys/devices/ocp.3/pwm_test_P9_31.13# echo 1000 > period
bash: echo: write error: Invalid argument
root@beaglebone:/sys/devices/ocp.3/pwm_test_P9_31.13# echo 500 > duty
root@beaglebone:/sys/devices/ocp.3/pwm_test_P9_31.13# echo 1000 > period
1 comment:
thanks for the info.
Post a Comment