Hi,
I have some trouble with using channel chaining feature of the DMA controller. The must have feature for us is to be able to program the DMA transfer once and have no need for any CPU intervention (including no interrupts) once the transfer is initiated. I'd like to use channel 0 of the DMA to transfer arbitrary number of 16bit words of data to the mibspi buffer for transferring out through SPI. The mibspi tx ram buffer is 128 bytes long. My assumption is to divide the data to 128 bytes chunks, and send any remaining data in chained transfer.
For example, let's assume I need to send 500 bytes. I would first configure the DMA channel 0 to send the 3 * 128 = 384 bytes. Channel 1 is configured to send remaining 116 bytes and is chained to channel 0. So the assumption is that when the channel 0 transfer is finished it is going to trigger the channel 1 transfer. What is happening however, is that the transfer of the last 116 bytes is initiated right after first frame of channel 0 transfer to the mibspi buffer is complete, so the first chunk of the data gets overwritten.
It looks like that the chained transfer is triggered just after the first frame of the transfer is complete, not after all the data was transferred for given channel.
My question is, is it possible to configure chained channel to initiate its transfer after all the data from the triggering channel was transferred?