PWM for jetson nano production SOM(eMMC)

Hi, I am facing issues while enabling GPIO for jetson nano.
I am using production SOM with eMMC and nvidea nano carrier board.
the only change I have made is on pinmux table , as I am using gpio 13 connected at 228 in schematic.
i changed it from default gpio to PWM.
Now I want to enable it , to see if its working or not, change its duty cycle and time period. Any suggestions and guidance to resources related to it would be very helpful. Thank you .

You could export the PWM device by below command.

~# echo 0 > /sys/class/pwm/pwmchip0/export
~# echo 1 > /sys/class/pwm/pwmchip0/export
~# echo 2 > /sys/class/pwm/pwmchip0/export
~# echo 3 > /sys/class/pwm/pwmchip0/export

And then configure the duty cycle and period as below.

~# 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

1 Like

thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.