EasyManua.ls Logo

Orange Pi PC Plus - Page 81

Orange Pi PC Plus
150 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
range Pi 用户手册 深圳市迅龙软件有限公司版权所有
www.orangepi.cn 80 www.xunlong.tv
root@orangepi:~# ls /dev/spi*
/dev/spidev0.0
2) Then compile the spidev_test test program
a. The compilation command for linux5.4 system is
root@orangepi:~/wiringOP/examples# make spidev_test
[CC] spidev_test.c
[link]
b. The compilation command for linux3.4 system is
root@orangepi:~/wiringOP/examples# make spidev_test_linux3_4
[CC] spidev_test.c
[link]
3) Do not short-circuit the mosi and miso pins of spi first, and the output result of
running spidev_test is as follows, you can see that the data sent and received are
inconsistent
a. The test commands and results of the linux5.4 system are
root@orangepi:~/wiringOP/examples# ./spidev_test -v -D /dev/spidev0.0
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF F0 0D | ......@....▒..................▒.
RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF | ................................
b. The test commands and results of the linux3.4 system are
root@orangepi:~/wiringOP/examples# ./spidev_test_linux3_4 -D /dev/spidev0.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00

Table of Contents

Related product manuals