nkj
February 11, 2021, 9:40pm
1
I am trying to test the PWM1(pwmchip2).
when doing sudo cat /sys/kernel/debug/pwm
the specific device shows as null. how can this be enabled.
i tried exporting as per the document PWM (Linux) | Toradex Developer Center but i ger a permission denied error.
apalis-imx8-06738422:/sys/class/pwm/pwmchip2$ sudo echo 0 > export
-sh: export: Permission denied
nkj
February 11, 2021, 10:41pm
2
had to call it like this. than permission denied error is not given. is this a bug in torizon or the normal way to use it ?
sudo sh -c "echo 0 > /sys/class/pwm/pwmchip2/export"
Greetings @nkj ,
As you’ve noticed there’s permissions to consider when trying to use certain interfaces on Torizon like PWM. The torizon
user doesn’t have permissions to interact with many of these interfaces requiring sudo/root.
We have an article about how to use PWM in a container here: How to Use PWM on TorizonCore | Toradex Developer Center
Since you’re on Torizon I assume you’ll want to use PWM in a container with whatever application you’re developing.
Best Regards,
Jeremias