SPI Communication between Jetson Nano & Arduino

Recently, I checked my SPI port is activate using Local Loop Test.

Now I have a plan to communicate between Jetson Nano & Arduino,
but having some difficulties with making the communication checking code.

Can you guys share the code to check the communication working well?
Also, can I get an information about hardware setup?

Forgot to say about my Jetson Nano information.

Jetson Nano Dev Kit 4GB
JetPack 4.6.5 Python 3.6.9

Hi jeyong8217,

Which SPI interface are you using?
Have you tried to use Jetson Nano as SPI master to communicate with your Arduino working as SPI slave?

What difficulties do you have?

Thank you for your reply.

I’m using SPI1 port (pin 19 21 23 24) and tried to use Jetson Nano as a Master which is general.

Well, really shameful about my skill to make the code.
I tried to find out the example code and setup for SPI communication between Jetson Nano & Arduino but I can’t find out examples…
So I ask here to get some example code to check if SPI transfer correctly.

I’m not sure if you’ve referred to the following thread to perform SPI loopback test.
Jetson Nano SPI Bus Not Working - #10 by KevinFFF

If so, you’ve used spidev_test tool to transmit SPI data.
You can also use that to communicate with your SPI slave device (Arduino).

Thank you for your reply.
I already checked that Local Loop Test is working.

One question, is level shifter need to connect between Arduino & Jetson Nano?

It may depend on your use case.
Please check what’s the high voltage on Jetson Nano and also your Arduino.
If they are same (e.g. both 3.3V), then you don’t need level shifter.
If they are different (e.g. one is 1.8V and one is 3.3V), then you may need level shifter to configure to be the same high voltage for them.

Well, I use Arduino UNO which use 5V as a logic level “1”.

On this case, I need level shifter… Thanks for your reply.