pwm err on Xavier l4t R32.3.1

Hello,
I used pwm gpio pin 18, on l4t R32.2.3, it can be used by changed the pinmux config tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg

pinmux.0x02434090 = 0x00000401; # soc_gpio12_ph0: rsvd0, pull-down, tristate-enable, input-enable, lpdr-disable

.
But when upgraded to l4t R32.3.1, nerther changing the pinmux config nor using the new tools Jetson‑IO, the pwm pin can’t be used normally.
Tested by Jetson.GPIO simple_pwm.py, it show

Traceback (most recent call last):
  File "/home/zhkj-robot/Documents/jetson-gpio/samples/simple_pwm.py", line 52, in <module>
    main()
  File "/home/zhkj-robot/Documents/jetson-gpio/samples/simple_pwm.py", line 40, in main
    p = GPIO.PWM(output_pin, 50)
  File "/home/zhkj-robot/Documents/jetson-gpio/lib/python/Jetson/GPIO/gpio.py", line 597, in __init__
    self._reconfigure(frequency_hz, 50.0)
  File "/home/zhkj-robot/Documents/jetson-gpio/lib/python/Jetson/GPIO/gpio.py", line 635, in _reconfigure
    _set_pwm_period(self._ch_info, self._period_ns)
  File "/home/zhkj-robot/Documents/jetson-gpio/lib/python/Jetson/GPIO/gpio.py", line 245, in _set_pwm_period
    f.write(str(period_ns))
IOError: [Errno 22] Invalid argument

Hi,

Can you read the value of the register once the system is booted?
devmem2 0x02434090

Are you not seeing 0x00000401

regards
Bibek

Hello bbasu,

I can see the value 0x401

/dev/mem opened.
Memory mapped at address 0x7faba35000.
Value at address 0x2434090 (0x7faba35090): 0x401

The error is due to low PWM frequency request of 50Hz in the script.
To get it to work at 50Hz, please change the kernel dtb to add “pwm-minimum-frequency-hz = 10;” property under
/
pwm@32c0000 {

pwm-minimum-frequency-hz = <10>;
};

or
you can just change the frequency to 200Hz to make it work by changing simple_pwm.py script by changing line40 to
p = GPIO.PWM(output_pin, 200)