I am running Jetpack5.1 on a NVMe SSD with all SDKs installed using SDKmanger.
I wanted to buy the official Jeston Xavier Developer kit but it has not been available so I had to pay the extra money to buy the recomputer from SeedStudios as an official partner of Nvidia. The recompute comes with the A206 carrier board but it is advertised as same as the Nvidia development board so the pin mapping should be identical.
I have tried to use " import Jetson.GPIO as GPIO" but it gives me the following error and when the python code changes the output state of the pin my scope doesn’t detect it has changed
WARNING: Carrier board is not from a Jetson Developer Kit.
WARNNIG: Jetson.GPIO library has not been verified with this carrier board,
WARNING: and in fact is unlikely to work correctly.
It is not possible to buy a Nvidia carrier board as Nvidia is not making them
I only wanted the offical Nvidia development kit but was forced to pay more money to buy the Seedstuios recomputer as Nvidia is only supplying Jetson products to seedstudios in a monopoly as their official partner.
Surely Nvidia is going to support their product that has been brought from their exclusive official partner?? Steedstudios is a retailer and is unlikely to have any idea on how to modify the Jetpack to solve the bug.
ohh, it turns out there’s an issue with GPIO controls, it cannot control the GPIO behavior. the temporary workaround is writing the pinmux register directly.
may I know what’s the pin configuration you’re going to achieve?
thanks
I am creating a demo robot for display during a robot competition. It is the upper body of a humanoid robot with animatronic eyes built with hobby servos and dynamixel to operate the 2DOF neck joint (eventually arms too). It hopefully will be an sort of interavtice chat bot. I am using pose estimation (trt_pose) for the robot to be able to know what humans are around it and what they are doing. I would like to also add a ASR to NLP to TTS to make it Q and A interactive hopefully casn get this up and running GitHub - dusty-nv/jetson-voice: ASR/NLP/TTS deep learning inference library for NVIDIA Jetson using PyTorch and TensorRT
What I want to do is create the signals to control the servos from the timers on the Jetson, I have currently found a work around by using a PCA9685 external driver that can create 16 channel fo PWM and controlled by I2C. I have installed the Adafruit busio library and it successfully operates the I2C bus to control the servo driver board although it gives the same error message about it not being the official carrier board. It would be nice to be able to remove this extra bit of hardware and use use the timer on the Jetson.
I also want to be able to use some programmable RGB LEDs aka NeoPixels. They use the SPI to create the serial signal train but atm I can’t get SPI to work either. Although I used Jetsion-io to set the SPI pins then saved then rebooted when I try ls /dev/spi* it says"No such file or directory"
Can we get the SPI working and 2 timers for the 2 servos working too all programmable from python??
there’s an issue to control the pin via sysfs neither python. you should use the pinmux configuration file to modify the settings. i.e. tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg
please see-also Enable SPI0 - #5 by ShaneCCC for NX SPI pin configure.
PIN-33, it’s pinmux.0x02440020 = 0x00000054; # soc_gpio54_pn1, you may update the cfg file to configure the pin.
you should already download the JetPack release to your host machine, and the files were located below the installation path.
for example, ~/nvidia/nvidia_sdk/JetPack_<version>_Linux_<platform>/Linux_for_Tegra/
the pinmux configuration file is under the bootloader/ folder, you may open it by text editor to change the pin settings.
since the temporary workaround is writing the pinmux register directly, you should perform the full flash by $ sudo ./flash.sh -r jetson-xavier-nx-devkit mmcblk0p1 to update the cfg settings.
after altering the cfg file then reflashing I still can’t use the GPIO pins.
If I attach my scope to the pin it show low until I run the python script then I get a 50Hz sine wave between 1.2v and 2v. This seems to happen with all the pins. See my attached screen shot from the scope.
FYI
Upstream GPIO driver does not support calling pinctrl APIs to make changes in pinmux register.
Currently, to make changes dynamically, we can use devmem/reg_dump to update pinmux register or update in MB1 pinmux bct.
for example, for pin 7, PQ6:
Pinmux register: 0x02430030
Default boot value: 0x5a
Update Bit 4 and Bit 6 to set required direction.
For Output: Bit 4 = 0 Bit 6=0
For input: Bit 4=1 Bit 6=1
Try below steps to make GPIO output working: /home/ubuntu/reg_dump -a 0x02430030 -w 0x0a echo 441 > /sys/class/gpio/export cd /sys/class/gpio/PQ.06 echo out > direction cat value # change value and check.
it’s utility for register read/write, you may try get the devmem2 for doing so.
for example, $ sudo devmem2 <physical address> <size (b/h/w)> [value] for reading the register value, by adding w [value] behind the command to write the register.
Is this the correct usage to send pin 7 high as I still can’t dectect a change on the pin?
shane@robot:~$ sudo devmem2 0x02430030 w 0x0a
/dev/mem opened.
Memory mapped at address 0xffffba6d5000.
Value at address 0x2430030 (0xffffba6d5030): 0x5A
Written 0xA; readback 0xA
shane@robot:~$ echo 441 > /sys/class/gpio/export
shane@robot:~$ cd /sys/class/gpio/PQ.06
shane@robot:/sys/class/gpio/PQ.06$ echo out > direction
shane@robot:/sys/class/gpio/PQ.06$ cat value
0
shane@robot:/sys/class/gpio/PQ.06$ echo 1 > value
shane@robot:/sys/class/gpio/PQ.06$ cat value
1
shane@robot:/sys/class/gpio/PQ.06$ echo 0 > value
sorry, I am not given correct example, could you please try again with following.
for Xavier NX’s pin-7, it’s GPIO9 / GPIO3_PS.04, whereas gpio number is 436.
the register address is… tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg:pinmux.0x02431020 = 0x00000400; # aud_mclk_ps4
when you execute Jetson-IO, the header screen shows the current configuration of the selected header; you may select from a list of configurations for hardware modules that can be attached to the header; or, you could specify which functions to enable on the header.
besides, please download pinmux spreadsheets for the default pin configurations.