PWM to control HAT-MDD10 with jetson nano


I try to send PWM command to control a HAT-MDD10 driver with the jetson nano.
I ran the Jetson-IO scripts and enabled pin 32 and 33 (pwm0 and 2 respectively).

I ran the following script provided by NVIDIA : jetson-gpio/ at master · NVIDIA/jetson-gpio · GitHub

I saw that the line 44 is correctly executed (motor connected to the MDD10 moves) but then the while loop and everything related to PWM is not working. In other words, GPIO is working but not PWM

Consequently, I went on your forum and find that I need to run the following commands :

# Enable pin 32 / PWM0
sudo busybox devmem 0x700031fc 32 0x45
sudo busybox devmem 0x6000d504 32 0x2

# Enable pin 33 / PWM2
sudo busybox devmem 0x70003248 32 0x46
sudo busybox devmem 0x6000d100 32 0x00

Now the script works as expected. Nevertheless, when I reboot, I need to execute these “devmem” commands again and again. I have the feeling it isn’t the best way to handle this issue.

Can you help me ?
What am I missing ?

Thanks in advance.

For any pin change we would suggest re-flash the system, so that the pin is well set from bootloader, kernel, to userspace. Please check Jetson Nano FAQ

Q: Why pinmux setting does not work on some pins?

Without re-flashing, you an try to run a script at startup to execute the commands. Please refer to

Q: How to autorun an app or commands at startup?

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