Processor is a SAMG55
I've successfully implemented a SPI Master DMA routine, and am now trying to make it a bit more versatile. As currently written, a buffer must be supplied for both TX and RX as well as a length for the transfer (I set TX length = RX length). What I would like to do is implement the transfer so that it can be used with a single buffer for either TX or RX.
Only transmitting seems pretty straightforward - simply don't enable the RX channel and set the buffer to NULL, but I'm not sure how to handle only receiving. It's my understanding that the TX channel will need to send data in order for anything to come back on the RX channel, because SPI.
Is it possible to configure the DMA controller to use a dummy byte that is sent over and over by TX rather than having to create an empty buffer the same size as the RX buffer and iterate through it?
Finally, what is the circular buffer mode used for, and how exactly is it used? The data sheet is very sparse on any information related to that. Is this the secret to transmitting a dummy byte for a receive only operation?