Driving a servo motor using the Jetson Xavier NX

I’m looking to drive two servo motors with a PWM Frequency of 9.2kHz using the Jetson Xavier NX.

I understand that Pin 32 and 33 can be configured to PWM using the file: /opt/nvidia/jetson-io/jetson-io.py

After configuration, save and reboot, the configuration doesn’t seem to apply.

To test, I’m using the jetson-gpio library (e.g. simple_pwm.py) to output a PWM signal on pin 33.

Unfortunately the oscilloscope does not show any PWM output on pin 33. Also using the file:


pin 33 is displayed as unused (not PWM output).

In order to configure PWM output on pin 33 and 32, would I need to go through the steps of creating a pinmux configuration file?

If so, can you please outline the steps to take?

Thank you!

hello peter.moser,

these pin by default configured as GPIOs. according to Jetson Xavier NX Pinmux Table,
for example,
pin-32/ GPIO07/ GPIO3_PR.00
pin-33/ GPIO13 / GPIO3_PN.01

you should customize the spreadsheet for the configuration of your board, please refer to developer guide, Pinmux Changes for the steps.
you should also check the python script, $OUT/Linux_for_Tegra/kernel/pinmux/t19x/pinmux-dts2cfg.py, and there’s readme file it demonstrate how to use this tool to convert pinmux, gpio and pad dts file into cfg format.