I’m new in Jetson and I work on spi communication between Jetson and MPU9255. I tested spidev with loopbacking and it’s fine. There are SPI1, SPI2 and SPI3 but only SPI1 works when I compile and run the code. As you see below, I tried spidev 3.1 (also spidev 3.0, spidev2.1 and spidev 2.0) but there is no data on SPI2 and SPI3 lines (Code 2). I’m new to use that system and try something every new day but now I’m stuck.
I have not figured out any correlation between the lowercase spi# designations from the device tree and the uppercase SPI# designations in the Developer Kit Carrier Board Specifications. There’s either some super significant historical reason… or the engineers just started randomly numbering things.
So for your examples above I would expect:
spidev3.1 to come out of J21 SPI1.1 (that's header pin 26)
spidev1.0 to come out of J23 Display Expansion Connector SPI0.1
spidev2.0 to not come out anywhere, I don't think it is routed on the devboard
I see you’re good at this board. But unfortunetly I don’t use Jetson DevKit, my one is special designed carrier board. Anyway, your news are very helpful for me in this way. Also I want to learn more things about Jetson, GPIO, SPI and UART… Could you advice me useful links or source in that case? I want to use spidev library but I didn’t find enoughly source even in spidev site. And if t’s possible I want to use C programming language.
There is an official gpio library, but its python:
SPI is one of those things that is usually handled by a kernel driver and device tree entry. Spidev is only really used for simple debugging. You can look at my MCP2515 guide on how to setup a device for SPI in the device tree.
UART is pretty straightforward, if you search the forums you should find quite a few examples of getting the UART ports set up.
Also if you can’t find information for the TX2 you can usually find something for the RPi that can help.