Hi ， I’m using RA6T1, and I study the manual, there are two modules to transfer data, dmac and dtc, and my question is,
1, what’s the main difference between these modules?
2, I’m doing a exercise like this transfer a 32bit data to gpt register every time gpt cnt overflow, the maximum frequency is 600khz, so which module I should use?
I regard over the manual, but didn’t get the point, so I want to get important information here, Thanks.
You're correct. Both the DMA and DTC can transfer data without the intervention of the CPU. The DMA, of which there's a limited number of channels, will be configured to be activated via an interrupt source, with data similar as source address, destination address, transfer size etc all ready set. WRead more
You’re correct. Both the DMA and DTC can transfer data without the intervention of the CPU.
The DMA, of which there’s a limited number of channels, will be configured to be activated via an interrupt source, with data similar 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’s possible to use all channels fairly quickly.
The DTC is a single channel of DMA that’s 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. However, also when the interrupt occurs the DTC will “ vector off ” to the address in the table, If an interrupt is set as a DTC detector. This address will store the transfer data- source address, destination address, data size etc and copy this into the DTC and the transfer will do.
Thus, the DTC can support numerous transfer requests, further 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 helpsSee less