Teacher:
When I was debugging SPI0 and SPI1 on the Orin Nano development board, I entered the following command and encountered an invalid command. May I ask what happened? Is the spidev version number I have chosen not suitable?
root@ubuntu:/home/lstd/Downloads# sudo /home/lstd/Downloads/spidev_test -D /dev/spidev2.1 -s8000000 -g8 -b8 -H -f pattern.txt -n1 -zzz -r
/home/lstd/Downloads/spidev_test: invalid option -- 'g'
Usage: /home/lstd/Downloads/spidev_test [-DsbdlHOLC3]
-D --device device to use (default /dev/spidev1.1)
…
root@ubuntu:/home/lstd/Downloads# sudo /home/lstd/Downloads/spidev_test -D /dev/spidev0.1 -s8000000 -g8 -b8 -H -f /home/lstd/Downloads/pattern.txt -n1 -zzz -t\
/home/lstd/Downloads/spidev_test: invalid option -- 'g'
Usage: /home/lstd/Downloads/spidev_test [-DsbdlHOLC3]
-D --device device to use (default /dev/spidev1.1)
…
*** Please note that this reply is generated by LLM automatically ***
I’m happy to help you with your question. However, I don’t see the specific question you’re asking about the Jetson Orin Nano and SPI0/SPI1 debugging. Could you please provide more context or clarify the question you’re asking?
From the provided context, I can see that there are several topics related to the Jetson Orin Nano, including CAN bus, device tree, SPI, and camera issues. However, I don’t see any specific information about debugging SPI0 and SPI1 on the Orin Nano development board.
If you could provide more information about the issue you’re experiencing, such as the exact command you entered and the error message you received, I’d be happy to try and help you troubleshoot the problem.
Additionally, I can provide some general information about the Jetson Orin Nano and its SPI interfaces. The Jetson Orin Nano has multiple SPI interfaces, including SPI0 and SPI1, which can be used for communication with external devices. The spidev version number you choose should be compatible with the kernel version and device tree configuration on your Jetson Orin Nano.
If you’re experiencing issues with SPI0 and SPI1 on your Jetson Orin Nano, I recommend checking the following:
- Device tree configuration: Make sure that the device tree configuration for SPI0 and SPI1 is correct and matches the hardware configuration on your development board.
- Kernel version: Ensure that the kernel version on your Jetson Orin Nano is compatible with the spidev version number you’re using.
- SPI interface configuration: Verify that the SPI interface configuration, including the clock speed, mode, and chip select, is correct for your application.
If you’re still experiencing issues, please provide more information about your setup and the error message you’re receiving, and I’ll do my best to help you troubleshoot the problem.
*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***
Hi 403199668,
What’s the Jetpack version in use?
Yes, your spidev_test tool may not support that option so that it reports the error.
How did you get the spidev_test tool?
Have you confirmed that you specify the correct spi device? (i.e. spidev2.1 as slave and spidev0.1 as master)
Oh, I feel particularly excited to see the teacher’s reply.
1.The version numbers“Jetpack” are as follows:
root@ubuntu:~# cat /etc/nv_tegra_release
R35 (release), REVISION: 6.1, GCID: 39721438, BOARD: t186ref, EABI: aarch64, DATE: Tue Mar 4 10:13:09 UTC 2025
2.How to obtain ‘spidev_test’?
1.Have you confirmed that you specify the correct spi device? (i.e. spidev2.1 as slave and spidev0.1 as master)
I set it up like this, do you think so?
Teacher:
I couldn’t find the following content in the device tree:

I couldn’t find the tegra_inctrl_reg file either. Is this related to an error?
Teacher:
Could you reply to me today?
Teacher:
Can you reply to me this afternoon?
The spidev_test from this github may not support for those options like -r, -t.
May I know what’s your requirement now?
Do you just want to verify SPI loopback test on Orin Nano with JP5.1.5(r35.6.1)?
The steps you are referring is for Jetson Nano with JP4.x rather than Orin Nano with JP5.x.
If you are verifying on the devkit, you can simply configure the pinmux for SPI through jetson-io tool.
$ sudo /opt/nvidia/jetson-io/jetson-io.py
Yes, now verify on the development board and then copy the operation on the customized board.
If you are verifying on the devkit, you can simply configure the pinmux for SPI through jetson-io tool.
Unable to send or receive data. Is there any SPI operation command or software for sending and receiving data?
May I know what’s your requirement now?
Teacher:
My custom carrier board and Nvidia development board use the same JetPack 5.1.5, so I would like to complete the testing on the development board now and then follow the same steps to copy it onto the custom carrier board.
If the - r and - t operations are not supported, SPI will not be able to send and receive data.
So I want to ask, how can I operate to complete the sending and receiving of SPI data?
No, -r is used for SPI slave, -t is used for SPI master.
These options are used when you configure one SPI interface and another as SPI slave and you connect them externally to perform the SPI transaction.
If you just want to verify one SPI interface at the same time, you can simply short MISO and MOSI to perform SPI loopback test.
The command could be the following one:
$ sudo ./spidev_test -D /dev/spidev0.0 -v -p "HelloWorld123456789abcdef"
Okay, teacher. I’ll give it a try first.
But I only use SPI0 and SPI1 to receive data, what command or tool should I use to display the received data?
The command(spidev_test) I provided in previous response will indicate both TX and RX data.
I connected the 40pin SPI0-MOSI and SPI0-MISO together, but didn’t receive any data?
Teacher, is there a way to continuously send data? I will use an oscilloscope to measure the waveform.
Have you used jetson-io tool to enable SPI1 for pinmux?
$ sudo /opt/nvidia/jetson-io/jetson-io.py
Configure Jetson 40pin Header -> Configure header pins manually -> [*] spi1 (19,21,23,24,26) -> Back -> Save pin changes -> Save and reboot to reconfigure pins -> Enter
You can simply write a custom script and run spidev_test tool in a loop to send the data continuously.
Have you used jetson-io tool to enable SPI1 for pinmux?
$ sudo /opt/nvidia/jetson-io/jetson-io.py
Teacher:
- I have run this command, and the entire operation process is as follows.Could you please help me check:
2.I have checked ‘pinmux’ and it seems to be correct. I don’t think there is a need to make any changes. The screenshot is as follows:
Teacher:
I have provided additional feedback on the following two issues:
1.The SPI drivers “spidev0.0, spidev0.1, spidev2.0, spidev2.1” disappear after each development board startup, and only appear after running the command “sudo modprobe spidev”. I don’t know if this is a normal phenomenon, please guide me.
- I wrote a Python script to loop and send. However, no output waveform was detected at port “SPI0_MOSI, SPI0_MOSI”;
Teacher, can you help me reply this morning?
Can you help me check if there are any errors in the operation process? Special thanks.
Teacher:
I changed my development board and followed the same process, but the SPI data still hasn’t been sent out.