|
发表于 2017-9-11 20:50:02
只看该作者
沙发
楼主,我使用3399 7.1系统,然后直接使用spidev_test 测试,硬件上直接短接spi1的tx和rx。测试结果发现接收的全是0。dtsi里面根据你说的修改后的 &spi1 {
status = "okay";
max-freq = <48000000>;
dev-port = <1>;
spidev0: spidev@10 {
status = "okay";
compatible = "linux,spidev";
reg = <0x00>;
spi-max-frequency = <48000000>;
};
};
短接spi1测试,结果还是不正常。 显示如下:
# ./test_spi -D /dev/spidev0.0 <
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 | ................................
不知道哪里没注意到,还请赐教。。。 |
|