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

如何将SD卡配置为DMA模式

CC3200 用户手册中对sd卡可以配置为DMA模式。

The controller can be configured to generate DMA requests and work with minimum CPU
intervention.

这个需要做怎样的处理,参看udma还是uart_dma?

Terry Han:

可以参考udma和UART-dma的例子,主要是弄清楚dma的使用方法,这样就能迁移到SD卡的操作中,SD卡的操作可以配置为SPI的模式,也可以参考SPI-DMA的例子,

可以参考一个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

赞(0)
未经允许不得转载:TI中文支持网 » 如何将SD卡配置为DMA模式
分享到: 更多 (0)