Introduction to Linux PWM Pulse Width
Modulator for NVIDIA Jetson TX2
The following document has information about the Pulse Width Modulators available for
the Jetson TX2 and how to control them.
There are eight PWMs available for the Jetson TX2:
Activating Jetson TX2 PWM
The Jetson TX2 pulse width modulators can be controlled at user space level using sysfs
interface or at driver level using the PWM API.
Control PWM through sysfs
There are available 4 PWMs to be controlled at user space level. This interface allow the
user to set the desired period and duty cycle and then activate or disable the PWM
selected.
In /sys/class/pwm, you will find four directories corresponding to the first fourth PWMs
available:
pwmchip0 --> GP_PWM1
pwmchip1 --> GP_PWM2
pwmchip2 --> GP_PWM3
pwmchip3 --> GP_PWM4 (Fan)
In order to set the configuration of one of the PWMs, you should export it first. Then, set
the period, duty cycle and enable state as the following:
echo 0 > /sys/class/pwm/pwmchip0/export
评论0