How to eanble pwm0 on jetson TX2

Hi,I want to enable pwm0 at power on jetson tx2 and then want to set period and duty cycle after that.

one method i found that

echo 0 > /sys/class/pwm/pwmchip0/export
cd /sys/class/pwm/pwmchip0/pwm0
echo 20000 > period
echo 10000 > duty_cycle
echo 1 > enable

is there any other method to enable it i want to enabe it bydefault i dont want to call this in my startup script.

Any help will be appreciated?

hello anupam.kumar,

please check debug flag for the PWM status.
for example, $ sudo cat /sys/kernel/debug/pwm

you may also refer to https://elinux.org/Jetson/PWM#PWM_directly_in_Tegra for controlling PWM.
thanks