TI中文支持网
TI专业的中文技术问题搜集分享网站

关于cc3200与ADS1293的spi连接问题

各位好。最近我用到了cc3200和ADS1293来完成一个心电项目。在cc3200和ADS1293之间的spi数据传输上遇到了问题。经过测试,我估计是cs的问题。把CS之间接地后可以向1293发送数据,但是1293无法向3200发送数据。

xyz549040622:

CS只要拉低,就可以开始传输数据了。和CS肯定没关系的,你用的是硬件SPI还是软件模拟呢?估计是配置的问题

Yonghua Pan:

参考一下CC3200手册里面的8.2.2.2.5, 看看波形对不对。

Terry Han:

可以参考两个例子一个是

C:\ti\CC3200SDK_1.2.0\cc3200-sdk\example\spi_demo

另一个是:

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

Garry Chang:

回复 Terry Han:

您好!

考虑到SPI读数的中断太多,我们想用SPI+DMA来读取ADS1293的数据,请问这种方式可行么?

Terry Han:

回复 Garry Chang:

可以使用DMA的方式,减少中断对于MCU的打断,可以参考上述GitHub上的DMA例子进行调试。

赞(0)
未经允许不得转载:TI中文支持网 » 关于cc3200与ADS1293的spi连接问题
分享到: 更多 (0)