Which system do you use? Android, Ubuntu, OOWOW or others?
Ubuntu
Which version of system do you use? Khadas official images, self built images, or others?
Khadas Ubuntu Server 20.04
Linux Khadas 4.9.241
Please describe your issue below:
Hi,
I can’t get pwm to work. I have followed the instructions from the docs here VIM3/3L PWM [Khadas Docs].
When I try the command echo 1 | sudo tee /sys/class/pwm/pwmchip4/export I get tee: /sys/class/pwm/pwmchip4/export: Device or resource busy and when I try enable I get tee: /sys/class/pwm/pwmchip4/enable: Permission denied.
How can I fix this and get PWM to work?
Does it not work without reinstalling the complete OS? I have a lot of stuff on my current OS installation and reinstalling it would be really annoying. Why do I have to use another os just to use pwm?
khadas@Khadas:~$ echo 1 | sudo tee /sys/class/pwm/pwmchip4/export
1
tee: /sys/class/pwm/pwmchip4/export: Device or resource busy
khadas@Khadas:~$ echo 1000000 | sudo tee /sys/class/pwm/pwmchip4/pwm1/period
tee: /sys/class/pwm/pwmchip4/pwm1/period: No such file or directory
1000000
khadas@Khadas:~$ echo 500000 | sudo tee /sys/class/pwm/pwmchip4/pwm1/duty_cycle
tee: /sys/class/pwm/pwmchip4/pwm1/duty_cycle: No such file or directory
500000
khadas@Khadas:~$ echo 1 | sudo tee /sys/class/pwm/pwmchip4/pwm1/enable
tee: /sys/class/pwm/pwmchip4/pwm1/enable: No such file or directory
1
Overlays:
overlays=uart3 pwm_f i2c3 watchdog
khadas@Khadas:~$ ls /sys/class/pwm/pwmchip4/
device export npwm power subsystem uevent unexport
Hi, I am having the exact same issue on a VIM3 Pro. I have also enabled UART for Pins 15 and 16, and I have the proper overlays for enabling PWM_F, what else should I try? I am trying to drive a servo motor. @ivan.li
Okay, so in the mean time software pwm is the only option? My team and I are working on a project and need a pwm pin of any sort as soon as possible. I’ve tried using the wiringPi distro with python and I am having issues with exporting pins/configuring for soft pwm.