PWM输出波形异常
-
通过命令输入
echo 0 > /sys/class/pwm/pwmchip0/export
echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 500000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
然后在串口打印日志中有
duty_ns=500000 period_ns=1000000 c =24000000
active_cycles=12000 entire_cycles=24000 prescale=0 div_m=0
但是示波器看波形不对,通过改变占空比波形也不变,不知道是哪里配置不对?
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号