PWM can't be set on Jetson expansion header (Orin Nano Jetpack 6)

I’m working on Jetson Orin Nano Dev kit 8GB with Jetpack 6 and I’m expecting to use pin 32 and 33 of Jetson expansion header for PWM control.

I used sudo /opt/nvidia/jetson-io/jetson-io.py to reconfigure the pins with pwm7 and pwm5 properly assigned respectively to pin 32 and 33.

But when using Jetson.GPIO I’m getting into trouble. Just the following small sequence is raising an error :
import Jetson.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
test_pwm=GPIO.PWM(33,100)

    raise ValueError("Channel %s is not a PWM" % str(channel))
ValueError: Channel 33 is not a PWM

It is same for channel 32.

I thought on a Development kit, using jetson-gpio was enough to reconfigure the expansion header. Did I missed something on the configuration ?

sudo cat /sys/kernel/debug/pwm
platform/39c0000.tachometer, 1 PWM device
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: normal

platform/32e0000.pwm, 1 PWM device
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: normal

platform/32c0000.pwm, 1 PWM device
pwm-0 (sysfs ): requested period: 0 ns duty: 0 ns polarity: normal

platform/32a0000.pwm, 1 PWM device
pwm-0 (pwm-fan ): requested enabled period: 45334 ns duty: 8178 ns polarity: normal

platform/3280000.pwm, 1 PWM device
pwm-0 (sysfs ): requested period: 0 ns duty: 0 ns polarity: normal

But I don’t see any reference to 32c0000.pwm in /sys/devices neither in /sys/devices/platform

Can I get an answer ?

Hello,

Welcome to the NVIDIA Developer forums! Your topic will be best served in the Jetson category.

I will move this post over for visibility.

Cheers,
Tom

Hi benoit.bourneuf,

Could you refer to the following to verify PWM on Orin Nano devkit?

$ sudo /opt/nvidia/jetson-io/jetson-io.py
(Configure Jetson 40pin Header -> Configure header pins manually -> [*] pwm5  (33),  [*] pwm7  (32) -> Back -> Save pin changes -> Save and reboot to reconfigure pins)
$ sudo apt update
$ sudo apt install git python3-pip pip
$ git clone https://github.com/NVIDIA/jetson-gpio.git
$ cd jetson-gpio
$ sudo python3 setup.py install
$ cd samples
$ sudo python simple_pwm.py

I’ve verified the above steps should work on Orin Nano devkit with JP6.0 DP (L4T R36.2).

/sys/devices/platform/bus@0/32c0000.pwm