How to use pwm on Orin Nano

I’m using a custom board with version r36.3. I want to configure GPIO13 and GPIO14 as PWM outputs. I have already changed the corresponding IO ports in pinmux_config to PWM mode. Is that all I need to do? Do I also need to modify the device tree or anything else? How should I control the PWM output’s period and duty cycle?

And I found that GPIO14 seems to be used for the fan’s PWM. How can I disable it? I don’t need the fan.

image

1 Like

Hi zjy523213189zjy,

Yes.

Please refer to Unable to generate PWM with Nvidia Jetson AGX Orin Development Kit - #6 by KevinFFF to use python script to generate PWM.

You can disable it from device tree.

I successfully controlled the pwm output of the original pwm-fan through /sys/class/pwm/pwmchip1.

I want to know which pwmchip in /sys/class/pwm/ does GP_PWM3 and GP_PWM5 in the pinmux table correspond to? How to check this?

You have to check the carrier board guide and the pinmux spreasheet and also the device tree for the mapping.
Or you can just refer to Jetson/L4T/peripheral/ - eLinux.org for the PWM address mapping on Orin Nano.

1 Like

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