sysfs pwm接口是否使用硬件pwm? [英] Is the sysfs pwm interface using hardware pwm?
问题描述
我按照此答案在我的Beaglebone Black上启用了PWM,但我当时没有不确定该方法是使用PRU进行硬件PWM还是在软件中切换引脚?我看到了对/sys/class/pwm/ehrpwm的其他引用(例如
I followed this answer to enable PWM on my Beaglebone Black, but I wasn't sure if that method is using the PRU to do hardware PWM or if it's toggling the pin in software? I see other references to /sys/class/pwm/ehrpwm (e.g. here) which I'm more confident is hardware PWM, but I'm not sure how to enable that interface.
总结一下我如何启用PWM:
To summarize how I'm enabling PWM:
echo am33xx_pwm > /sys/devices/bone_capemgr.9/slots
echo cape-universal > /sys/devices/bone_capemgr.9/slots
config-pin P8.13 pwm
echo 6 > /sys/class/pwm/export
echo 1 > /sys/class/pwm/pwm6/run
echo 50000 > /sys/class/pwm/pwm6/period_ns
echo 50000 > /sys/class/pwm/pwm6/duty_ns
谢谢!
推荐答案
是的,使用硬件PWM模块-am33xx_pwm
覆盖启用所有不同的PWM子系统(eHRPWM,eCAP),然后PWM内核驱动程序配置所配置引脚的相应PWM模块.
Yup, that's using the hardware PWM modules - the am33xx_pwm
overlay enables all the different PWM subsystems (eHRPWM, eCAP), then the PWM kernel driver configures the corresponding PWM module for the pin being configured.
这篇关于sysfs pwm接口是否使用硬件pwm?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!