环境:两块CC3200开发板,一块做主,一块做从
描述:demo中的比特率:100000调试OK,上调比特率到2500000bps的时候就出现乱码;
问题:文档中描述SPI最高可以到达20Mbps,现在只达到2.5Mbps,我现在需要大约6Mbps的通讯速度,还请分析一下原因,谢谢!
Viki Shi:
如果要更高速率,建议参考SPI DMA的例子:
https://github.com/severin-kacianka/cc3200_dma_spi_example/
cc3200_dma_spi_example
Here are two examples that show how to use SPI with DMA and FIFO on the CC3200. I hope that they are a useful starting point for anyone, who wants to work on SPI and DMA in the future.
The examples are compiling fine on Linux with gcc 4.9.3 from http://launchpad.net/gcc-arm-embedded. All you need to change is the path for the SDK in the Makefile. The hardware setup is similar to the SPI example in the SDK: just connect two CC3200 via cable (Pins GND, P05, P06, P07 and P08). I have set the following jumpers: J6, J7, J8. J9. J10, J11, J12, J13.
simple_spi_transfer is an example of an SPI transfer without DMA and FIFO. The master sends a buffer to the slave, reads it back in the next transfers and verifies the checksums.
transfer_1024_byte implements a simple SPI/DMA transfer that will transfer 1024 (or whatever DMA_SIZE is set to) bytes from the master to the slave and back. It then calculates the buffer's CRC checksum and (on the master) compares the send checksum to the received checksum.
transfer_64k shows how to transfer a 64k buffer from the master to the slave and back again.
windows contains a Makefile send to me by Matt van de Werken that also works using the Launchpad tools in a Cygwin enviroment
kevin zhang8:
回复 Viki Shi:
在上述您提供的例程里面:编译无法找到
SetupTransfer()函数,这个函数是在哪一块实现的?这个可以用UDMASetupTransfer()替代?
da qin zheng sheng:
引脚上拉增强驱动能力,减小通信距离。
user4725089:
回复 da qin zheng sheng:
使用: 编译了 1024软件的版本(使用了 DMA 和 FIFO),使用 CC3200 LAUNCHXL 编译完成下载到板子里面,怎么连 SPI 的时钟都没有。
user4725089:
回复 da qin zheng sheng:
使用: 编译了 1024软件的版本(使用了 DMA 和 FIFO),使用 CC3200 LAUNCHXL 编译完成下载到板子里面,怎么连 SPI 的时钟都没有。