- board: Jetson Nano Developer Kit
- JetPack ver: 4.6.3
for SPI test
I enabled spi1 using jetson-io and reboot
After reboot via sudo modprobe spidev
I got /dev/spidev0.0 /dev/spidev0.1 /dev/spidev1.0 /dev/spidev1.1
so I executed sudo ./spidev_test -D /dev/spidev0.0 -g16 -zz
But result is
using device: /dev/spidev0.0
setting spi mode for read,write
setting spi bpw
setting max speed for rd/wr
spi mode: 0
bits per word: 8 bytes per word: 1
max speed: 10000000 Hz (10000 KHz)
no. runs: 1
loop count = 0
using sequential pattern ....
transfer bytes 
0000: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
transfer: Return actual transfer length: 16
receive bytes 
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
mismatch index 1
^^^ 00 00 00 00 00 00 00 00 00 00 00 /dev/spidev0.0: TEST FAILED !!!!! (status:-1)
I want to test passed Please Help
How do you get spidev_test binary?
Is that built from spidev_test.c source on your board?
I searched for this issue on the Nvidia forums and got a binary file uploaded by a moderator and used it.
And when I compiled the source file of the link above and ran it, the same result came out.
Could you help to refer to the following thread to do SPI loopback test?
How to set gpio for spi? - #27 by DaneLLL
To compile spidev_test.c, please put this file in the board and run the following command to generate binary.
$ gcc -o spidev_test spidev_test.c
and please also refer to the following thread to disable GPIO usage for SPI pins.
MCP251x broken on Jetpack 4.6.3 - #11 by KevinFFF
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.