gpt4 book ai didi

beagleboneblack - BeagleBone Black (v4.14) 上的 PWM

转载 作者:行者123 更新时间:2023-12-02 03:35:57 28 4
gpt4 key购买 nike

关于如何在较新版本的内核上为 PWM 配置 Beaglebone 的信息非常少。 Past instructions通过插槽文件与 PWM 接口(interface)的方法已过时,因为插槽文件和 bone_capemgr 是 disabled in v4.14内核。

如何使用新内核为 BeagleBone Black 配置 PWM?我使用的是运行内核版本 4.14.37-ti-r46 的 TI AM335x BeagleBone Black Wireless。

最佳答案

如问题中所述,插槽文件和 bone_capemgr 是 disabled in v4.14支持 U-Boot overlays 的内核.

response by the BeagleBone kernel developer 中所述, U-Boot 现在处理覆盖并自动启用 cape_enable=bone_capemgr.enable_partno=univ-all,BB-ADC,BB-PWM0,BB-PWM1,BB-PWM2 的等效项:

All 5 of those are enabled out of the box with the images now shipping under:

https://beagleboard.org/latest-images

For the pwm's make sure to reference https://github.com/beagleboard/bb.org-overlays/blob/master/examples/cape-unversal-pwm.txt and the config-pin pwm <pin#>..

因此,PWM接口(interface)已经配置好了!现在只需导出并使用 PWM。例如访问 pwm0:

root@beaglebone:~# cd /sys/class/pwm/pwmchip0
root@beaglebone:/sys/class/pwm/pwmchip0# ls
device export npwm power subsystem uevent unexport

root@beaglebone:/sys/class/pwm/pwmchip0# echo 0 > export
root@beaglebone:/sys/class/pwm/pwmchip0# ls
device export npwm power pwm-0:0 subsystem uevent unexport

root@beaglebone:/sys/class/pwm/pwmchip0# ls pwm-0:0
capture device duty_cycle enable period polarity power subsystem uevent

注意:如果引脚已被使用,您可能需要在 /boot/uEnv.txt 中使用 disable_uboot_overlay_video=1 禁用 HDMI。

要确定 PWM 接口(interface)的引脚映射,请参阅我的后续帖子 PWM chip to pin mapping on BeagleBone Black (v4.14) .

关于beagleboneblack - BeagleBone Black (v4.14) 上的 PWM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50203064/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com