User's Manual

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 381 of 1852
Nov 30, 2020
RX23W Group 18. DMA Controller (DMACA)
18.4 Ending DMA Transfer
The operation for ending DMA transfer depends on the transfer end conditions. When DMA transfer ends, the DTE bit in
DMCNT and the ACT flag in DMSTS of DMACm are changed from 1 to 0, indicating that DMA transfer has ended.
18.4.1 Transfer End by Completion of Specified Total Number of Transfer Operations
(1) In Normal Transfer Mode (DMACm.DMTMD.MD[1:0] = 00b)
When the value of DMCRAL of DMACm changes from 1 to 0, DMA transfer ends on the corresponding channel, and
the DTE bit in DMCNT of DMACm is cleared to 0 and the DTIF bit in DMSTS of DMACm is set to 1 at the same time.
If the DTIE bit in DMINT of DMACm is 1 at this time, a transfer end interrupt request is issued to the CPU or the DTC.
(2) In Repeat Transfer Mode (DMACm.DMTMD.MD[1:0] = 01b)
When the value of DMCRB of DMACm changes from 1 to 0, DMA transfer ends on the corresponding channel, and the
DTE bit in DMCNT of DMACm is cleared to 0 and the DTIF bit in DMSTS of DMACm is set to 1 at the same time. If
the DTIE bit in DMINT of DMACm is 1 at this time, an interrupt request is issued to the CPU or the DTC.
(3) In Block Transfer Mode (DMACm.DMTMD.MD[1:0] = 10b)
When the value of DMCRB of DMACm changes from 1 to 0, DMA transfer ends on the corresponding channel, and the
DTE bit in DMCNT of DMACm is cleared to 0 and the DTIF bit in DMSTS of DMACm is set to 1 at the same time. If
the DTIE bit in DMINT of DMACm is 1 at this time, an interrupt request is issued to the CPU or the DTC.
Before sending an interrupt request from the DMAC to the CPU or the DTC, the interrupt control register must be set.
For details, see section 15, Interrupt Controller (ICUb).
18.4.2 Transfer End by Repeat Size End Interrupt
In repeat transfer mode, a repeat size end interrupt is requested when transfer of a 1-repeat size of data is completed
while the RPTIE bit in DMINT of DMACm is set to 1. When the interrupt is requested to complete DMA transfer, the
DTE bit in DMCNT of DMACm is cleared to 0 and the ESIF flag in DMSTS of DMACm is set to 1. If the ESIE bit in
DMINT of DMACm is 1 at this time, an interrupt request is issued to the CPU or the DTC. Here, the transfer can be
resumed by writing 1 to the DTE bit in DMCNT of DMACm.
A repeat size end interrupt can be requested also in block transfer mode. In block transfer mode, the interrupt is requested
in the same way as in repeat transfer mode when transfer of a 1-block size data is completed.
Before sending an interrupt request from the DMAC to the CPU or the DTC, the interrupt control register must be set.
For details, see section 15, Interrupt Controller (ICUb).