Hello,
I’m trying to use SPI on my Jetson Nano 2GB, but I’m having some issues with the data not being sent to my Arduino. I’ve installed SPI on the Jetson, but when I use it, the data doesn’t come through. When I use an RPI instead of the Jetson, everything works fine.
I connected an oscilloscope to sck of spi0 on the Jetson and it shows that the voltage is ~1.9 volts when idle and 3.3 volts when sending data. This is different from the 0 volts I would expect from a Jetson. Could you please help me understand why this is happening?
Thank you for your help!
Hi,
There is loopback test on Jetson Nano developer kit. Please give it a try:
See if you can run this setup successfully first. The latest Jetpack 4 release is 4.6.6. If you use previous version, would suggest upgrade the system to latest version.
Hello,
Okay, I connected the MOSI and MISO pins and ran the SPI test. Here are the results:
$ sudo ./spidev_test -D /dev/spidev0.0 -v -p "HelloWorld123456789abcdef"
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | 48 65 6C 6C 6F 57 6F 72 6C 64 31 32 33 34 35 36 37 38 39 61 62 63 64 65 66 __ __ __ __ __ __ __ | HelloWorld123456789abcdef
RX | 48 65 6C 6C 6F 57 6F 72 6C 64 31 32 33 34 35 36 37 38 39 61 62 63 64 65 66 __ __ __ __ __ __ __ | HelloWorld123456789abcdef
$ sudo ./spidev_test -D /dev/spidev0.0 -O -H -v -p "HelloWorld123456789abcdef"
spi mode: 0x3
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | 48 65 6C 6C 6F 57 6F 72 6C 64 31 32 33 34 35 36 37 38 39 61 62 63 64 65 66 __ __ __ __ __ __ __ | HelloWorld123456789abcdef
RX | 48 65 6C 6C 6F 57 6F 72 6C 64 31 32 33 34 35 36 37 38 39 61 62 63 64 65 66 __ __ __ __ __ __ __ | HelloWorld123456789abcdef
$ sudo ./spidev_test -D /dev/spidev0.0 -s 10000000 -v
spi mode: 0x0
bits per word: 8
max speed: 10000000 Hz (10000 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@......................�
RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@......................�
I will not check the slave mode, as I am using the Jetson as the master device.
I attempted to update the version following the instructions, but encountered an error. Is there a way to resolve this issue?
Current version
$ head -n 1 /etc/nv_tegra_release
# R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t210ref, EABI: aarch64
Error while sudo apt update
Ign:16 https://repo.download.nvidia.com/jetson/t210 r36.3 InRelease
Err:18 https://repo.download.nvidia.com/jetson/t210 r36.3 Release
404 Not Found [IP: 23.201.29.17 443]
Get:20 https://repo.download.nvidia.com/jetson/common r36.3/main arm64 Packages [28,0 kB]
Reading package lists... Done
E: The repository 'https://repo.download.nvidia.com/jetson/t210 r36.3 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
sources list
$ sudo cat /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
deb https://repo.download.nvidia.com/jetson/common r36.3 main # disabled on upgrade to focal 32.6 - base
deb https://repo.download.nvidia.com/jetson/t210 r36.3 main # disabled on upgrade to focal