Enabling SPI on Jetson Nano 2GB

I have used Jetson IO to configure the 40 pin header in the Nano 2GB for SPI1 (LT: 32.4.4).
I was wondering if there are any SPI libraries that are provided that can be used to test the connection, modify word length, speed, etc.? I noticed that spidev is not in the native SD card image.

Thanks!

For the dev spi node you need to enable it by the jetson-io.
Also you can search the SPI relative topic to get more information.

Iā€™m also trying to get SPI running on my nano. I have used jetson-io to attempt to enable SPI 1. It shows as enabled after reboot, but it does not actually work. There is nothing in /dev named SPI and lsmod does not list spidev. I have also installed spidev via pip3 install spidev. I think Iā€™m missing a crucial step here, but I do not know what it is. I have tried the loopback test and get ā€œcanā€™t open device: No such file or directory Aborted (core dumped)ā€
Do I need to build a device tree? I have this all running on a Raspberry Pi, which Iā€™m fairly comfortable with. It seems like the jetson-io should make it similar, but Iā€™m lost with the dtc stuff, so if you know of somewhere that could walk me through that step-by-step, I would really appreciate it.

Need modeprobe spidev to load spidev module to generate /dev/spidev.x.x

3 Likes

Thanks for the quick reply! I used modprobe (I assume the ā€˜eā€™ was a typo) as follows:
sudo modprobe spidev
and something that seems like magic happened. I now have the devices and lsmod shows spidev. Awesome!
Now I can get the spi test loop working and it receives what it sent. Also awesome!
Now I run my actual code (which is to a RFM69 radio module) and it says
ā€œImportError: No module named spidevā€ when my code tries ā€œimport spidevā€
How do I point it to the spidev module? I know it is thereā€¦

1 Like

May need install spidev python module.

pip3 install spidev