On the MPC574xR, SARADC0 and SARADC1 I want to do a block transfer of the data after an end-of-chain interrupt is generated. When configuring eDMA block transfers, we can only specify the start address and total number of bytes to be transferred. This is very convenient if we have all the data in contiguous memory.
In my case, I have configured chan2, chan5, chan6, chan9, chan11, chan12 in a scan chain and generate an interrupt at the end of chain after chan12 is sampled. The channels are not equally spaced, so I cannot give a fixed offset when configuring the TCD.
Since I use one-shot triggering, the CDATA register is not overwritten until the end of scan chain. After the last channel has been sampled, I can setup eDMA to block transfer 6 x16-bit values to the destination. Only problem is that my source address increment is not constant - after chan2 is transferred, the source address must be incremented by 12 bytes to access CDATA5, then 4 bytes to access CDATA6, 12 bytes to address CDATA9, 8 bytes to access CDATA11 and 4 bytes to access CDATA12. There is no pattern that I can use to increment the source address.
I do not want to setup 6 eDMA channels, one for a sample from each of the channels in the scan chain.
Is there an alternative?
On this community we handle questions regarding MATLAB/Simulink and our toolboxes - for your question I would suggest you move it to MPC community, to get a more detailed answer.
I am not familiar with MPC574xR SDK, but you might be able to use scatter/gather mode for DMA - this is the process of loading new TCDs into a DMA channel (so you have multiple TCDs). In this mode the DMA channel is scattering the data to multiple destinations or gathering it from multiple sources. In this way, after the major loop is finished, another TCD is fetched and loaded into the respective channel (replacing the current descriptor); or at least this is how you can use eDMA on other platforms. You'll get more details after posting your question on the MPC community.
Hope this helps,