Hello,
I have two Jetson Xavier NX developer boards, which are in custom baseboards for testing purposes. The first board is working fine, but the second one has a lot of GPIO issues. I don’t know what the problem is, as I put the SD-Card from the working Jetson to the not working Jetson and even with the same SD, Jetson #2 is not toggeling any pin or even detecting interrupts on pins. The error is described below. I suspect a hardware issue with the second one, or a hardware update, but do not know enough to say something like this.
I would really appreciate any kind of help.
These are the ways I tested the toggeling the (board)Pin 23: The first one is a python script which I started with sudo:
import Jetson.GPIO as GPIO
import time
led = 23
GPIO.setmode(GPIO.BOARD)
GPIO.setup(led, GPIO.OUT, initial=GPIO.HIGH)
while True:
GPIO.output(led, GPIO.LOW)
time.sleep(0.1)
GPIO.output(led, GPIO.HIGH)
time.sleep(0.3)
Output:
WARNING: Carrier board is not from a Jetson Developer Kit. # Ignore this message, as we do not use a pinmux but the GPIOs are the same as in Jetson devkit
WARNNIG: Jetson.GPIO library has not been verified with this carrier board,
WARNING: and in fact is unlikely to work correctly.
Traceback (most recent call last):
File "gpioTest.py", line 10, in <module>
GPIO.output(led, GPIO.LOW)
File "/usr/lib/python3/dist-packages/Jetson/GPIO/gpio.py", line 455, in output
_output_one(ch_info, value)
File "/usr/lib/python3/dist-packages/Jetson/GPIO/gpio.py", line 179, in _output_one
ch_info.f_value.flush()
OSError: [Errno 19] No such device
Shell test:
jetson@jetson:~$ sudo su
root@jetson:/home/jetson# echo 192 > /sys/class/gpio/export
bash: echo: write error: Invalid argument
root@jetson:/home/jetson# echo 480 > /sys/class/gpio/export
root@jetson:/home/jetson# echo out > /sys/class/gpio/gpio480/direction
bash: /sys/class/gpio/gpio480/direction: No such file or directory
root@jetson:/home/jetson# ls /sys/class/gpio/
export gpiochip240 gpiochip248 gpiochip288 unexport
This code is not throwing any error, but is also not working:
jetson@jetson:~$ sudo gpioset gpiochip0 192=1
jetson@jetson:~$ sudo gpioset gpiochip0 192=0
The user jetson is also in the gpio group:
jetson@jetson:~$ groups
jetson adm dialout cdrom sudo audio dip video plugdev i2c lpadmin lightdm sambashare weston-launch gpio
Thanks