Hello,
I have finally resolved all my problems with SPI, DMA and FIFO (see e2e.ti.com/.../399482 or e2e.ti.com/.../402137) and wanted to share my working examples with you. I hope they serve as a useful starting point for anyone who wants to work with SPI and DMA in the future.
My examples are compiling fine on Linux with gcc 4.9.3 from 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.
transfer_1024_byte.zip 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.zip shows how to transfer a 64k buffer from the master to the slave and back again.
If you have any questions or suggestions, please just let me know.
I want to give a special thanks to Praveen, who really helped me a lot to understand SPI/DMA and fix my bugs.
Cheers,
Severin