Pinmux Configuration for PWM input signals - Jetson AGX with Jetpack4.6

Hello,

I am trying to operate a servo motor with PWM signals using GPIO pins of Jetson AGX Xavier.

I got the Jetson.GPIO library from (GitHub - NVIDIA/jetson-gpio: A Python library that enables the use of Jetson's GPIOs) and installed it and set the udev rules, followed those steps. And then I understood that I have to configure the system pinmux to be able to send PWM signals to the pins.

And downloaded the Jetson_AGX_Xavier_Series_Pinmux_Configuration_Template.xlsm but don’t know what to change and how to change values for me to configure all the PWM pins (PWM01, GPIO35, GPIO27) of AGX. And even after changing few things just to see if I could generate the dtsi files, I couldn’t get anything from it. I am clicking Generate DT file button in excel file but it is not generating. I am not sure what is it that I am doing wrong.

Also I am not able to find Linux_for_Tegra folder in my Jetson with jetpack4.6 so I downloaded that folder from Nvidia Downloads. Is it normal to not find those by default even after flashing the Jetpack?

Any help would be greatly appreciated. @JerryChang

Thank you

hello user38008,

you should operate this on the WindowOS to generate *.dtsi files via excel.
after that, please copy those generated dtsi files to your local host, i.e. x86 flashing machine, and running python script to convert them as *.cfg file for image flashing.

Hello @JerryChang

So I have to generate those *.dtsi files on Windows OS okay. Can you tell me what changes should I make in Excel file as I could not find anywhere on what or how to do it. I want to make changes so that the PWM signals will reach the PWM pins (PWM01, GPIO35, GPIO27) and then they will output those signals through those pins.

And to sum it up. Once I generate those *dtsi files, I have to copy those my x86 ubuntu host machine right. And from there, I have to tranform those files into .*cfg. Then how do I flash that config file into the Jetson AGX?

Is it just with this type of command?

$ cd $JETPACK_ROOT/Xavier/Linux_for_Tegra/
$ sudo ./flash.sh jetson-xavier mmcblk0p1

Also can you guide me on how to install pygame library in Jetson AGX Xavier

hello user38008,

it depends-on your pin usage, please scroll the spreadsheets to review the [Filled in by Customers] fields, you may toggle the pin muxing to revise those pin configurations. click the [Generate DT File] button to create *.dtsi files.

you may access NVIDIA SDK Manager | NVIDIA Developer to download JetPack release image for setting up your development environment,
the installation path looks like… ~/nvidia/nvidia_sdk/JetPack_<version>_<platform>/Linux_for_Tegra/
all the flashing binaries, tools, scripts were included, and you’ll also see pinmux-dts2cfg.py under the .../Linux_for_Tegra/kernel/pinmux/t19x/ folder.
thanks

@JerryChang You mean, I have to download the Jetpack release image again in the host OS? Do I have to do it again, because if I already flashed the Jetson AGX from my host ubuntu OS, it will have that folder (Tegra_for_Linux) right?

Regards,
Naga Sanketh Vysyaraju

Hello @JerryChang

Thank you for all the inputs. I have generated the config file after transforming the dtsi files through this

python3 pinmux-dts2cfg.py --pinmux addr_info.txt gpio_addr_info.txt por_val.txt pinmux.txt tegra19x-jetson_agx_devkit-pinmux.dtsi tegra19x-jetson_agx_devkit-gpio-default.dtsi 1.0 > tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg

Once I got the config file, I manually ,moved it to nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_AGX_XAVIER_TARGETS/Linux_for_Tegra/bootloader/t186ref/BCT and overwrote the existing config file

Then I moved to
nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_AGX_XAVIER_TARGETS/Linux_for_Tegra and tried to flash the config file with this command

sudo ./flash.sh jetson-xavier mmcblk0p1

but it is giving me this error

###############################################################################
L4T BSP Information:
R32 , REVISION: 6.1
###############################################################################
Error: probing the target board failed.
Make sure the target board is connected through
USB port and is in recovery mode.

I followed these steps to put it in recovery mode
Press force recovery button and then power button on

But still it is giving me the same error.

I am not sure if it is going into recovery mode. Since I am already using the Jetson AGX and now I wanted to change the GPIO pins configuration, I am trying to flash the config file but not sure what I am doing wrong. Can you please help me to flash the config file or tell me what could be going wrong in this?

Thank you
Naga Sanketh Vysyaraju

hello user38008,

could you please determine your device is entering forced-recovery mode with $ lsusb
thanks