CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 7593|回复: 3

初学疑惑:cubieboard在调试spi中出现的问题,求大神指点迷津@_@

[复制链接]
发表于 2015-7-27 16:02:37 | 显示全部楼层 |阅读模式
各位大神:
      我的板子是cubietruck,使用cubieez系统,我在@maosuyun2009大神的(http://cubie.cc/forum.php?mod=vi ... 7&highlight=spi)帖子的指导下实现了dev文件夹下的spidev0.0。
     我的fex文件修改为:
[spi0_para]
spi_used = 1
spi_cs_bitmap = 1
spi_cs0 = portI10<2><default><default><default>
spi_sclk = portI11<2><default><default><default>
spi_mosi = portI12<2><default><default><default>
spi_miso = portI13<2><default><default><default>
[spi_devices]
spi_dev_num = 1
[spi_board0]
modalias = "spidev"
max_speed_hz = 12000000
bus_num = 0
chip_select = 0
mode = 0
full_duplex = 1
manual_cs = 0
往spidev0.0里面echo数据的时候完全没有输出,clk也一直没有捕获到,这是为什么啊?
我dmesg开机log显示spi_sun7i:master is unqueued, this is deprecated,
跟这个有没有关系??求大神指点一二,我实在是没有什么好的想法。谢谢大家。
回复

使用道具 举报

发表于 2015-7-27 16:46:43 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-7-27 17:08:47 | 显示全部楼层
jiangdou 发表于 2015-7-27 16:46
https://github.com/jiangdoudou/linux-sdk-a20/tree/shanghai-a20-spi/spi-driver-test

惊动大神了大神我之前已经拿这个测试过了,spi输入输出端口短接,但是显示一直是全0,我看到您的打印信息中也有上面的master is unqueued, this is deprecated,还是不知道为什么没有能够输出,您有什么建议吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-7-27 17:54:02 | 显示全部楼层
jiangdou 发表于 2015-7-27 16:46
https://github.com/jiangdoudou/linux-sdk-a20/tree/shanghai-a20-spi/spi-driver-test

打印信息如下:多谢大神指导
root@cubietruck:/# ./spi -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
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00
root@cubietruck:/# dmesg |grep spi
[spi-inf] Found 1 spi devices in config files
[spi-inf] boards num modalias         max_spd_hz       bus_num  cs   mode
[spi-inf] spi_board0 irq gpio not used
[spi-inf] 0          spidev           12000000         0        0    0x0   
[spi-inf] sun7i_spi_probe: spi0 dma type: normal
[spi-inf] bus num = 0, spi used = 1
[spi-inf] sun7i_spi_probe: spi0 cs bitmap: 0x1
[spi-inf] sun7i_spi_set_mclk: spi0 source = sdram_pll_p, src_clk = 432000000, mclk 86400000
sun7i-spi sun7i-spi.0: registered master spi0
sun7i-spi sun7i-spi.0: master is unqueued, this is deprecated
spi spi0.0: setup mode 0, 8 bits/w, 12000000 Hz max --> 0
sun7i-spi sun7i-spi.0: registered child spi0.0
[spi-inf] sun7i_spi_probe: reuuimlla's SoC SPI Driver loaded for Bus SPI0 with 2 Slaves at most
[spi-inf] sun7i_spi_probe: spi0 driver probe succeed, base f02a8000, irq 42, dma_id_rx 24, dma_id_tx 24
spidev spi0.0: setup mode 0, 8 bits/w, 12000000 Hz max --> 0
spidev spi0.0: spi mode 00
spidev spi0.0: setup mode 0, 8 bits/w, 12000000 Hz max --> 0
spidev spi0.0: 8 bits per word
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 500000 Hz (max)
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: spi mode 00
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 8 bits per word
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 500000 Hz (max)
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: spi mode 00
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 8 bits per word
spidev spi0.0: setup mode 0, 8 bits/w, 500000 Hz max --> 0
spidev spi0.0: 500000 Hz (max)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-11-23 00:35 , Processed in 0.026884 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部