Can't able to set GPIO13 of Orin NX as PWM

Hello everyone,
We’re working with a custom board based on the Jetson Orin NX module running JetPack 6.0, which includes Jetson Linux 36.3 with Kernel 5.15 and an Ubuntu 22.04 root file system. We’re attempting to configure SOC_GPIO13 (pin 228) as PWM. According to the TRM, GPIO13 corresponds to PWM2, and we’ve set GPIO13 as GP_PWM5 in the Pinmux configuration.

Steps followed:

Added a device tree node:
/* PWM2 */
pwm@3290000 {
status = “okay”;
};

PWM was detected as pwmchip1 under /sys/devices/platform/bus@0/3290000.pwm/pwm/.

Upon trying the following commands:
echo 0 > /sys/class/pwm/pwmchip1/export
echo 500000 > /sys/class/pwm/pwmchip1/pwm0/period

we encountered a FIREWALL_ERR,
root@tegra-ubuntu:/sys/class/pwm/pwmchip1# [ 928.893903] CPU:0, Error: cbb-fabric@0x13a00000, irq=180
[ 928.893957] **************************************
[ 928.893965] CPU:0, Error:cbb-fabric, Errmon:2
[ 928.893977] Error Code : FIREWALL_ERR
[ 928.893992]
[ 928.893998] Error Code : FIREWALL_ERR
[ 928.894002] MASTER_ID : CCPLEX
[ 928.894009] Address : 0x3290000
[ 928.894013] Cache : 0x1 – Bufferable
[ 928.894022] Protection : 0x2 – Unprivileged, Non-Secure, Data Access
[ 928.894032] Access_Type : Write
[ 928.894036] Access_ID : 0x6
[ 928.894039] Fabric : cbb-fabric
[ 928.894045] Slave_Id : 0x3b
[ 928.894048] Burst_length : 0x0
[ 928.894050] Burst_type : 0x1
[ 928.894052] Beat_size : 0x2
[ 928.894054] VQC : 0x0
[ 928.894056] GRPSEC : 0x7e
[ 928.894057] FALCONSEC : 0x0
[ 928.894060] Slave : AXI2APB_9
[ 928.894064] **************************************
[ 928.894161] WARNING: CPU: 0 PID: 2039 at drivers/soc/tegra/cbb/tegra234-cbb.c:608 tegra234_cbb_isr+0x144/0x190
[ 928.895201] —[ end trace 2fcf6c59125831d9 ]—

Would anyone be able to advise on additional steps or configurations needed to properly set up GPIO13 as PWM?

Hi zanaz.khan,

pin228 should be GPIO13SOC_GPIO21

Please modify 32c0000.pwm instead.

And you can refer to following thread to verify.
Unable to generate PWM with Nvidia Jetson AGX Orin Development Kit - #6 by KevinFFF

Hi KevinFFF,
Thanks for your response we were able to use the pin as PWM

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