PWM8 not working on JetsonXavierNX (GPIO07/pin32)


Working on a custom board (Jetson Xavier NX - Jetpack 4.5), not a devKit, I would like to use the PWM capability of the GPIO07 (gpio424 on my board). But it doesn’t work.

I used the tool, as it is explained in the documentation, to configure the pin as needed but nothing changed. After a complete reboot of the board, the configuration that I changed on pin32 vanished and the pin still get the status “unused”.

I used the following commands to generate a 10Hz signal, which is working on another board with the same parameters/env :

$ echo 0 > /sys/class/pwm/pwmchip4/unexport
$ echo 1 > /sys/class/pwm/pwmchip4/export
$ echo "0" > /sys/class/pwm/pwmchip4/pwm0/enable
$ echo "100000000" > /sys/class/pwm/pwmchip4/pwm0/period
$ echo "50000000" > /sys/class/pwm/pwmchip4/pwm0/duty_cycle
$ echo "1" > /sys/class/pwm/pwmchip4/pwm0/enable

In this case, the commands are inefficient.
But, I’m able to control the GPIO07 with (Low/High) :

$ echo 424 > /sys/class/gpio/export
$ echo 0 > /sys/class/gpio/gpio424/value
$ echo 1 > /sys/class/gpio/gpio424/value
$ echo 0 > /sys/class/gpio/gpio424/value

I don’t understand why I’m able to change the state of the pin but not use it as a PWM ?
If you need more info, please ask me ;)

Thank you in advance.

hello BasGAus,

since you’re using a customer board, you’ll need to use the pinmux spreadsheets to modify the pin configurations.
please access pinmux spreadsheets for reference, thanks


Thanks for the reply.
We have not changed any of the hardware configuration. So the pinmux is the same.

I send you the DeviceTree configuration (.dtb) that was saved after using the tool. You will see that the configuration for pin32 hasn’t changed, despite the use of the tool. (used with sudo and “save and reboot” option)

configPin32_Carte11.txt (387.4 KB)
File saved just after the modification of pin32(pwm8).

Do you have any idea about why it is still configured to “unused”/gp after using the dedicated tool ?

Thank you for your time

hello BasGAus,

as you can see in the default pin settings, GPIO07 is configured as GPIO, GPIO3_PR.00 by default;
please use the pinmux spreadsheets to modify the pin configurations to set it as SFIO, GP_PWM8.
for your reference, here’s created *.dtsi file with SFIO settings.

		pinmux_default: common {
			/* SFIO Pin Configuration */
			soc_gpio44_pr0 {
				nvidia,pins = "soc_gpio44_pr0";
				nvidia,function = "gp";
				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;

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