No PWM signal on Jetson Nano

You probably need a transistor. See Jetson Nano GPIO - JetsonHacks

i still get a constant (amplified) signal with a transistor, no modulation occuring

Did you set user permissions?

How should I set the user permissions?? If you mean:

sudo groupadd -f -r gpio
sudo usermod -a -G gpio $USER
cp /opt/nvidia/jetson-gpio/etc/99-gpio.rules /etc/udev/rules.d/
udevadm control --reload-rules && sudo udevadm trigger

Then yes, I did

reboot, run simple_pwm.py, then periodically check

$ sudo cat /sys/kernel/debug/pwm

I get a constant output:

ottobot@ottobot-nano:~$ sudo cat /sys/kernel/debug/pwm
platform/70110000.pwm, 1 PWM device
 pwm-0   (pwm-regulator       ): requested enabled period: 2500 ns duty: 0 ns polarity: normal

platform/7000a000.pwm, 4 PWM devices
 pwm-0   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-1   (pwm-regulator       ): requested enabled period: 8000 ns duty: 1440 ns polarity: normal
 pwm-2   (sysfs               ): requested enabled period: 20000000 ns duty: 20000000 ns polarity: normal
 pwm-3   (pwm-fan             ): requested enabled period: 45334 ns duty: 0 ns polarity: normal
ottobot@ottobot-nano:~$ sudo cat /sys/kernel/debug/pwm
platform/70110000.pwm, 1 PWM device
 pwm-0   (pwm-regulator       ): requested enabled period: 2500 ns duty: 0 ns polarity: normal

platform/7000a000.pwm, 4 PWM devices
 pwm-0   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-1   (pwm-regulator       ): requested enabled period: 8000 ns duty: 1440 ns polarity: normal
 pwm-2   (sysfs               ): requested enabled period: 20000000 ns duty: 20000000 ns polarity: normal
 pwm-3   (pwm-fan             ): requested enabled period: 45334 ns duty: 0 ns polarity: normal
ottobot@ottobot-nano:~$ sudo cat /sys/kernel/debug/pwm
platform/70110000.pwm, 1 PWM device
 pwm-0   (pwm-regulator       ): requested enabled period: 2500 ns duty: 0 ns polarity: normal

platform/7000a000.pwm, 4 PWM devices
 pwm-0   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-1   (pwm-regulator       ): requested enabled period: 8000 ns duty: 1440 ns polarity: normal
 pwm-2   (sysfs               ): requested enabled period: 20000000 ns duty: 20000000 ns polarity: normal
 pwm-3   (pwm-fan             ): requested enabled period: 45334 ns duty: 0 ns polarity: normal
ottobot@ottobot-nano:~$ sudo cat /sys/kernel/debug/pwm
platform/70110000.pwm, 1 PWM device
 pwm-0   (pwm-regulator       ): requested enabled period: 2500 ns duty: 0 ns polarity: normal

platform/7000a000.pwm, 4 PWM devices
 pwm-0   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-1   (pwm-regulator       ): requested enabled period: 8000 ns duty: 1440 ns polarity: normal
 pwm-2   (sysfs               ): requested enabled period: 20000000 ns duty: 20000000 ns polarity: normal
 pwm-3   (pwm-fan             ): requested enabled period: 45334 ns duty: 0 ns polarity: normal
ottobot@ottobot-nano:~$ sudo cat /sys/kernel/debug/pwm
platform/70110000.pwm, 1 PWM device
 pwm-0   (pwm-regulator       ): requested enabled period: 2500 ns duty: 0 ns polarity: normal

platform/7000a000.pwm, 4 PWM devices
 pwm-0   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-1   (pwm-regulator       ): requested enabled period: 8000 ns duty: 1440 ns polarity: normal
 pwm-2   (sysfs               ): requested enabled period: 20000000 ns duty: 20000000 ns polarity: normal
 pwm-3   (pwm-fan             ): requested enabled period: 45334 ns duty: 0 ns polarity: normal
ottobot@ottobot-nano:~$ sudo cat /sys/kernel/debug/pwm
platform/70110000.pwm, 1 PWM device
 pwm-0   (pwm-regulator       ): requested enabled period: 2500 ns duty: 0 ns polarity: normal

platform/7000a000.pwm, 4 PWM devices
 pwm-0   ((null)              ): period: 0 ns duty: 0 ns polarity: normal
 pwm-1   (pwm-regulator       ): requested enabled period: 8000 ns duty: 1440 ns polarity: normal
 pwm-2   (sysfs               ): requested enabled period: 20000000 ns duty: 20000000 ns polarity: normal
 pwm-3   (pwm-fan             ): requested enabled period: 45334 ns duty: 0 ns polarity: normal

Well, i switched to generating the PWM signals via a PCA9685 using the I2C bus of the Jetson Nano, seems something is off with my board PWM. Either way, thanks a lot!

1 Like