Hi， I am using RA6T1, and I study the manual, there are two modules to transfer data, dmac and dtc, and my question is,
1, what is the main difference between these modules?
2, I am doing a application like this: transfer a 32bit data to gpt register every time gpt cnt overflow, the max frequency is 600khz, so which module I should use?
I glance over the manual, but did not get the point, so I want to get important information here, Thanks.
You are correct. Both the DMA and DTC can transfer data without the intervention of the CPU.
The DMA, of which there is a limited number of channels, will be configured to be activated via an interrupt…
The DMA, of which there is a limited number of channels, will be configured to be activated via an interrupt source, with data such as source address, destination address, transfer size etc all ready set. When the interrupt occurs the data transfer will occur within a couple of clk cycles.
As mentioned, there are a limited number of DMA channels so it is possible to use all channels relatively quickly.
The DTC is a single channel of DMA that is set at the point of activation of an interrupt. In the same way the CPU has an interrupt vector table, which specifies the address of the ISR code, so the DTC has a DTC vector table. If an interrupt is set as a DTC trigger, then when the interrupt occurs the DTC will “vector off” to the address in the table. This address will store the transfer data - source address, destination address, data size etc and copy this into the DTC and the transfer will occur.
Therefore, the DTC can support many transfer requests, more than the DMA.
The limitation of the DTC is the time it takes for the data transfer to occur, due to the DTC vector read and setup. The actual transfer of data is the same as the DMA, so using the DTC is good for large blocks of data. The DMA may be better for single data transfer in your use case.
But the DTC also has a nice mode called chain mode where a single activation can activate other transfers. Simply ensure that the configuration data in memory is continuous.
hope this brief explanation helps
OK， it helps, thanks. I am studying the manual.