Jetson TX2 SPI

They are the same, the vale is the key the string after the # just comment only.

The question: why do you ask me to use devmem2 for change the addresses value, if I can do it in the Text Editor? As I see in the net, devmem2 is a program to read/write location in memory, and not for edit files.

Ok, thank you! Now I see in Jetson-io tool, that SPI4 is “enabled on 40-pin header”.
Next question is how to check, that SPI4 works correctly?
I have a device (SPI master), that connected to my Jetson TX2 and send some data (for example, “FFF”) to SPI4 on Jetson.
How can I see that data (“FFF”) in the terminal or in the file in Ubuntu?

You can try the spidev_test by the loopback to verify the driver and device configure is correct first.

The Jetson TX1 Developer Kit includes the SPI1 channel on it’s J21 Expansion header. The SPI1 MOSI/MISO signals are pins 19 & 21 on J21.

https://elinux.org/Jetson/TX1_SPI#Installing_SPIdev_Kernel_Module

I tried spidev_test, and I think the result is ok, please se the photo: https://yadi.sk/d/mimr3hTeMYE-RQ
Now I want to understand the next:

  1. How configiure my SPI4 (master/slave, frequency, byte sequence etc)?
  2. How to receive and see the data, which comes from other device, connected to SPI4 on Jetson?

Hi! I asked my question a week ago, but I can`t see the answer. I was in a buisness trip this week, may be you too.
So, I came back, and my question is still how to use SPI4 now?:

  1. How configiure my SPI4 (master/slave, frequency, byte sequence etc)?
  2. How to receive and see the data, which comes from other device, connected to SPI4 on Jetson?
  1. Have a check below document for the slave mode configure.
    …/kernel/kernel-4.9/Documentation/devicetree/bindings/spi/nvidia,spi-slave-tegra124.txt

  2. You should consult with the device vendor how to test/verify the device data.

1 Like

Sorry, but there is no folder “…/kernel/kernel-4.9/…” neither in my Jetson TX2 Developer kit, nor in the Host machine. And there is no “spi-slave-tegra124.txt” file.
Why do you ask me to find things, that does not exist?

No, dear, I should consult with you! Vendor is just a seller. But you are (Nvidia) is the developer of Jetson TX2 Developer kit, which I bought for my money.
And I surprised, that the developer does not understand, how do his product works!
So, please, give me information, how to configure and use SPI on Jetson TX2 Developer kit to send/receive data to/from another device with SPI interface! In master and in slave mode, please.

Did you download the kernel source to customize your kernel to implement the driver??
You should need to check how to build the customize kernel and get the device driver to integrate the driver to Jetson system.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fkernel_custom.html%23

Did I get your point right: you suggested me to study kernel sources to build my own driver, because you don`t have your own ready-to-use driver?

Yes, suppose device vendor should provide the device driver or programing guide.

It is not very good idea, because we have bought the complicated device, and it should have ready-to-use driver. We don`t want to spend a time for developing our own driver.

We bought Jetson TX2 Developer kit with the help of some company, and now it is not possible now to identify the seller (vendor). What should we do in this case?
Please, see the photos: https://yadi.sk/i/1Jx5dNdmQvhDyQ and https://yadi.sk/i/Ii7mjq_kpi5qPQ

But explain me, please, why you ask me to consult with the vendor? As i know, the vendor is just a seller, it is not a developing company. Or it is not?

What my meaning is consult with the SPI device vendor to provide the source code or programing guide to integrate to Jetson system to enable it.

The SPI device in our case is Arduino Nano. And SPI in Arduino is working correct. I can transfer data via SPI from one Arduino to another Arduino without any problem.

I just ask you for the SPI driver for Jetson!

OK, then I think you should be able to enable the SPI interface for jetson as early comment.
Any problem to verify it like two Arduino case?

The problem is that in Arduino there is special library for SPI. And I use it.
And I ask you for the special library for SPI for Jetson. For Python, for example.

I think the python should be like below. You should be able use it on Jetson too.

Thnak you!
Can you also provide me the description of SPI registers on Jetson and how to configure it manually via Python?

Not sure if you want the SPI controller REG. You can download the TRM from the download center to check.
And if you would like to configure the SPI via python I think it’s the standard interface for the SPIDEV protocol like speed …

Thank you very much!
Now my SPI connection is working good via SPIDEV library.

Now, my next question is about I2C. I need to make connection via I2C protocol, using Jetson TX2 Developer kit. Please, tell me, what library can I use for that? (like SPIDEV for SPI).
Also tell me please, if had to configure smth for use J21 pins, or it`s ready to use?