-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinuxGPIO or SPI doesn't work on NVIDIA Orin Nx #1708
Comments
Just wondering if you can help here since you are the author of PR #1299. |
Just wondering if you can help here as well since you seem to be familiar with linuxspi. |
Are you using sysfs and not libgpiod? If that is the case, please try libgpiod to see if that works. Reference: please refer to this discussion, once the user switches to libgpiod, the problem got resolved. |
Please help to use libgpiod and try latest git main. Thanks. |
@ltidswell Just checking where you are with this issue? |
@stefanrueger Found the issue to be the SPI pins don't output enough current (20uA) on the Nvidia SOMs. Selecting pins that output 20mA (I2C pins, datasheet: https://files.seeedstudio.com/products/NVIDIA/reComputer-J401x-datasheet.pdf) works using linuxGPIO but still had to manually convert to Nvidia GPIO names. Am attempting to use a non-inverting buffer on the SPI pins to see if that works. @mcuee will try git main when I get a chance but hoping using a buffer will fix the issue. |
Thanks for reporting back. This might help others with the same issue.
If you have an idea how git main could help please tell us in more detail. Better still submit a PR, eg, where the GPIO naming scheme is a -x command line parameter or a parameter in the avrdude.conf entry. |
Any updates on this issue? We may have to close the issue a few days later (say one week later) if we do not hear from you. |
@mcuee I fixed the issue by only using high current pins (#1708 (comment)). Am yet to try other solutions |
@ltidswell |
I am trying to program an Arduino Nano using AVRDUDE via the ICSP header on the Nano and the MOSI, MISO, and SCK pins on the 40 pin expansion header on the Orin Nx. I am using the Seeed Studio base board with the Orin Nx 16GB (https://www.seeedstudio.com/reComputer-J4012-p-5586.html) and have Jetpack 5.1.1 installed. Am using version 7.2 of AVRDUDE and followed these install instructions: https://github.com/avrdudes/avrdude/wiki/Building-AVRDUDE-for-Linux
Confirmed the Arduino & wires work by testing it on a Pi. Am trying to run:
sudo avrdude -v -p m328p -c linuxgpio
The naming convention for GPIO pins on the NVIDA Orin (also on the Xavier NX, possibly other NVIDIA devices too) is not gpioPINNUM like on other devices, the pins I am using and what they're called within /sys/class/gpio are:
389 --> PG.06 481 --> PZ.03 483 --> PZ.05 482 --> PZ.04
I modified linuxgpio.c to accept this naming convention and am managing to export the first pin but am now getting this error:
avrdude main() error: unable to open port gpiochip0 for programmer linuxgpio
I used gpioinfo to confirm the pins I am using are in gpiochip0.
I get a similar error trying to open the SPI port.
Any idea on how to fix this / is there support for using AVRDUDE on these devices?
Note: programming works via USB connection but in my application I can't use this.
The text was updated successfully, but these errors were encountered: