beagleboard / linux

The official Read Only BeagleBoard and BeagleBone kernel repository https://git.beagleboard.org/beagleboard/linux
http://beagleboard.org/source
Other
715 stars 566 forks source link

PWMs' freq and duty can't be set correctly #207

Closed uhwsin closed 4 years ago

uhwsin commented 5 years ago

hi, I found the frequency and the duty of the PWM can't be set correctly. eg, If you set the freq of the PWM to 20kHz, you will get a 19.9kHz wave form. if the freq is set to 10MHz, you will get a 9.1MHz wave form. And , if the freq is set to 10MHz, and set the duty to 50%, you will get a 55% duty.

pdp7 commented 4 years ago

@uhwsin are you still having this issue?

if so, please paste the output of: sudo /opt/scripts/tools/version.s

In addition, please try our current Debian image: https://github.com/beagleboard/Latest-Images

uhwsin commented 4 years ago

I download the Latest image, but the problem is same as before. Here is the version.sh output:

git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46] eeprom:[A335BNLT00C05218BBBK0066] model:[TI_AM335x_BeagleBone_Black] dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06] bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR] bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g9ca2c5819f]:[location: dd MBR] UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts] UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0] UBOOT: Loaded Overlay:[BB-ADC-00A0] UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0] UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0] kernel:[4.19.94-ti-r42] nodejs:[v10.15.2] /boot/uEnv.txt Settings: uboot_overlay_options:[enable_uboot_overlays=1] uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo] uboot_overlay_options:[enable_uboot_cape_universal=1] pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>] pkg:[bb-cape-overlays]:[4.14.20200403.0-0rcnee0~buster+20200403] pkg:[bb-wl18xx-firmware]:[1.20200322.0-0rcnee0~buster+20200322] pkg:[kmod]:[26-1] pkg:[librobotcontrol]:[1.0.4-git20190227.1-0rcnee0~buster+20190327] pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305] groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide] cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] dmesg | grep remote [   62.549925] remoteproc remoteproc0: wkup_m3 is available [   62.704029] remoteproc remoteproc0: powering up wkup_m3 [   62.704064] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168 [   62.704356] remoteproc remoteproc0: remote processor wkup_m3 is now up [   66.382330] remoteproc remoteproc1: 4a334000.pru is available [   66.396725] remoteproc remoteproc2: 4a338000.pru is available dmesg | grep pru [   66.382330] remoteproc remoteproc1: 4a334000.pru is available [   66.382530] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully [   66.396725] remoteproc remoteproc2: 4a338000.pru is available [   66.396917] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully dmesg | grep pinctrl-single [    0.921374] pinctrl-single 44e10800.pinmux: 142 pins, size 568 dmesg | grep gpio-of-helper [    0.934650] gpio-of-helper ocp:cape-universal: ready lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub END

------------------ 原始邮件 ------------------ 发件人: "notifications"<notifications@github.com>; 发送时间: 2020年6月11日(星期四) 凌晨4:25 收件人: "beagleboard/linux"<linux@noreply.github.com>; 抄送: "niswhu"<uhwsin@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [beagleboard/linux] PWMs' freq and duty can't be set correctly (#207)

@uhwsin are you still having this issue?

if so, please paste the output of: sudo /opt/scripts/tools/version.s

In addition, please try our current Debian image: https://github.com/beagleboard/Latest-Images

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.