Procedure for enabling and testing SPI on TX2 Jetpack 4.6.5

I need to enable and test one of the spi ports on the TX2 on the dev carrier board. I have used jetpack 4.6.5 to flash the latest image. I’ve used the jetson-io.py tools to enable the port SPi4 on J21 of the dev carrier board pins 19,21,23. I ran modprobe spidev.
$ ls /dev/spi*
/dev/spidev3.0 /dev/spidev3.1

Can I somehow install the user space tools available in later ubuntu versions? https://launchpad.net/ubuntu/+source/spi-tools

If not, is there a simple way to test the spi? Is there anything else I need to do? I found all sorts of information on line about modifying device tree, recompiling kernel etc but that seems to be out of date (hopefully).

Thanks in advance! Felix

Hi felix76,

Please share the result of the following command on your board.

$ cat /etc/nv_tegra_release
$ cat /etc/nv_boot_control.conf

an also the full dmesg as file here for further check.

Have you tried to use Jetson-IO to configure the pinmux for SPI before use?

Okay. Echo seems to work as expected. sudo echo -e “\xA5” > /dev/spidev3.0

So presumably if I open from code I can read/write.

@KevinFFF Yes I did need to configure the pins with the jetson-io tool.

It seems you get it working use echo command.
You can also use spidev_test tool to test SPI.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.