SPI device driver issue on Cubietruck Android
Hi everyone,I have a question on cubietruck SPI, and am seeking help from this group. Hope someone can help me.
My target OS is android, and the BSP is cubieboard2_android_SDK_v1.09. The SPI2 (pin5~8) is used and the configuration is as following:
spi_used = 1
spi_cs_bitmap = 1
spi_cs0 = port:PC19<3><default><default><default>
spi_cs1 = port:PB13<2><default><default><default>
spi_sclk = port:PC20<3><default><default><default>
spi_mosi = port:PC21<3><default><default><default>
spi_miso = port:PC22<3><default><default><default>
spi_dev_num = 1
modalias = "spidev"
max_speed_hz = 12000000
bus_num = 2
chip_select = 0
mode = 0
full_duplex = 0
manual_cs = 0
When I try to debug the spi driver, I got the log info as following:
sun7i_spi_transfer: enter
sun7i_spi_work: enter
sun7i_spi_xfer: spi2 begin transfer, txbuf ecea2ac0, rxbuf (null), len 246
spi_set_bc_wtc: bc: 246
spi_set_bc_wtc: tc: 246
sun7i_spi_prepare_dma: enter
sun7i_spi_config_dma: enter
sun7i_spi_start_dma: enter
sun7i_spi_xfer: spi2 wait for xfer complete
init: sys_prop: permission denied uid:1003name:service.bootanim.exit
start_powernow uncare mode:859320624!
wait for xfer complete sun7i_spi_transfer: enter
/dev/ttyS0: wait: for: argument must be %job or process id
/dev/ttyS0: wait: xfer: argument must be %job or process id
/dev/ttyS0: wait: complete: argument must be %job or process id
/dev/ttyS0: wait: sun7i_spi_transfer:: argument must be %job or process id
/dev/ttyS0: wait: enter: argument must be %job or process id
sun7i_spi_work: enter
/dev/ttyS0: : not found
sun7i_spi_xfer: spi2 begin transfer, txbuf ecea2ac0, rxbuf (null), len 246
/dev/ttyS0: syntax error: '(' unexpected
sun7i_spi_prepare_dma: enter
/dev/ttyS0: : not found
sun7i_spi_config_dma: enter
/dev/ttyS0: : not found
sun7i_spi_start_dma: enter
/dev/ttyS0: : not found
sun7i_spi_xfer: spi2 wait for xfer complete
Somehow SPI transferring was never get finished.
May someone tell me what's wrong and how to do?
Thanksa lot in advance!
ttyS0 not open,please open the uart0
蓝天-彭 发表于 2015-9-23 09:06 static/image/common/back.gif
ttyS0 not open,please open the uart0
Hi 蓝天-彭
Thanks a lot for your response.
Did you mean uart_para0?
uart_used = 1
uart_port = 0
uart_type = 2
uart_tx = port:PB22<2><1><default><default>
uart_rx = port:PB23<2><1><default><default>
I think it's opened already. Am I right?
thanks again!
henryhzhang 发表于 2015-9-23 12:38 static/image/common/back.gif
Hi 蓝天-彭
Thanks a lot for your response.
It is right
Hello all,
I have found the following descriptions in A20_系统配置手册_V1.0_20130521.pdf
Page #26
7.6.
chip_select=xx 理论上可以选0,1,2,3,目前只支持1,2(芯片每引出接口)
This pdf file could be found in Android BSP, the path is lichee/tools_win/documentations.
is there anyone could help to explain it?
Thanks a lot!
Page #26
7.6.
chip_select=xx xx should be 0,1,2,3, but only 1,2 for A20
页:
[1]