I debugged the 40PIN SPI0 and SPI1, and the information is as follows:
Ø Board type: ORIN NANO 4GB NVIDIA;
Ø JetPack 5.1.5.
During debugging, I have been unable to obtain a suitable spidev_test. I started downloading a spidev_test on Githubusecontent. com, but it shows that the version is not supported. Later, Teacher Kevin FFF helped me write a spidev_test, which ran normally but could neither send nor receive data.
I have recorded the debugging steps here. Could you please help me check if my judgment is accurate? Steps are as follows:
Step 1: Connect the wires as shown in the following diagram:
Step 2: Check the addresses of SPI0 and SPI1, and then modify the device tree file (dtb - o tegra234-p3768-0000+p3767)-
0005-nv.dtb), Change SPI1 to “Slave” mode.
Step 3: Modify the file “/var/lib/python3/dist packages/Jetson/GPIO/gpio_pin_data. py” and remove the GPIO definitions for SPI0 and SPI1. The modification result is as follows:
Step 5: Debugging Preparation:
$Restart the development board;
$ sudo modprobe spidev
$ sudo /opt/nvidia/jetson-io/jetson-io.py
$ sudo chmod a+x spidev_test
Step 6: debugging process
6.1 Open a Shell window and enter the following command to receive:
$ Sudo Chmod 777 …/Downloads/pattern_record.txt
$ sudo …/Downloads/spidev_test -D /dev/spidev2.0 -s8000000 -g8 -b8 -H -f
…/Downloads/pattern_record.txt -n1 -zzz -r
6.2 Open another shell window and repeat the following send command:
$ Sudo Chmod 777 …/Downloads/pattern.txt
$ sudo …/Downloads/spidev_test -D /dev/spidev0.0 -s8000000 -g8 -b8 -H
-f …/Downloads/pattern.txt -n1 -zzz -t
Step 7: Test results:
7.1:No content was received when viewing pattern_decord. txt;
7.2:Use Python. py to continuously input the send command of 6.2, and use an oscilloscope to detect SPI0_MOSI. It was found that there was no waveform output.
Additionally:
I tested the receiving function of “spidev_test” on the board I designed (using the MCU to send SPI data), but still couldn’t receive any data. So I suspect there might be issues with both the sending and receiving functions of “spidev_test”?
Teacher “KevinFFF” has been very busy recently and is responding to messages slowly. Due to the urgency of the project, I am posting this again here. I hope other teachers from NVIDIA can help me solve this problem. It’s very urgent.











