Part Number: CC2541
Hello,
I'm using SPI to communicate with a CC2541 (while receiving packets in proprietary mode).
Using DMA in single mode, I handle incoming SPI "packets" when the DMA interrupt occurs, and then re-arm the channel.
During the time spent handling the packet, the channel is thus not armed - meaning SPI data may be lost.
The obvious solution would be to use single repeat mode, but from what I've read in the PDF - there's no double buffering available for the DMA.
This means I have to switch the destination buffer in the DMA configuration before re-arming.
I've thought about using two DMA channels (both configured with the same SPI RX trigger, but with different buffers) and setting up an interrupt when the CS pin goes active to switch buffers, but this seems a bit cumbersome.
Is there a proper way to do this? Am I missing something?
Thank you.