RX610 Group
12. DMA Controller (DMAC)
R01UH0032EJ0120 Rev.1.20
Page 333 of 1006
Feb 20, 2013
12.6
Usage Notes
12.6.1
Register Settings
(1) When setting the bits or registers below, set them when the DASTSm flag (m = 0 to 3) in DMASTS is 0 (data
transfer is not in progress) and the DEN bit in DMCRE of DMACm is 0 (DMA transfer disabled) or when the
DMST bit in DMSCNT is 0 (DMAC stop) for the target channel.
Registers: DMMOD, DMCRB, DMCRC, DMCDA, and DMCBC of DMACm
Bits: DSEL[1:0] bits and DCTG[5:0] bits in the DMCRA register of DMACm
Write 0 to the DREQ bit in DMCRD of DMACm (However, the DREQ bit can be set to 1 independently of the
DMA transfer status.)
(2) Access the following registers with 32 bits.
DMMOD, DMCSA, DMCDA, DMCBC, DMRSA, and DMRDA of DMACm
(3) Modify the ECLR bit in DMCRC of DMACm while the DASTSm flag (m = 0 to 3) in DMASTS is 0 (data transfer
is not in progress). When the reload function is not used, set the ECLR bit to 1 (the DEN bit is cleared to 0 at the
end of DMA transfer) to clear the DEN bit in DMCRE of DMACm.
(4) When the DCTG[5:0] in DMCRA of DMACm is set to 1, be sure to clear the DREQ bit in DMCRD of DMACm
and then set the DMST bit in DMSCNT to 1 (DMAC start) and the DEN bit in DMCRE of DMACm to 1 (DMA
transfer enabled) for the selected channel.
(5) The DREQ bit in DMCRD of DMACm varies with the presence or absence of DMA transfer request regardless of
the setting of the DMST bit in DMSCNT and the DEN bit in DMCRE of DMACm. Unless software trigger is
selected as a DMA activation source, do not write 1 to the DREQ bit by the program.
(6) Set each address register and transfer byte count register to an aligned value according to data size. Table 12.6 lists
alignment and the lower 2 bits of each register according to data size.
(7) Do not use any bit manipulation instruction such as BSET instruction to clear
the DEDETm flags in DMEDET
. To
clear the DEDETm flags, set only the bit of a channel to be cleared to 1 using the MOV instruction, and write to the
DMEDET register.
Table 12.6 Alignment and the Lower 2 Bits of Each Register According to Data Size
SZSEL[2:0] Bits in DMMOD of
DMACm
Alignment
Address Registers
Transfer Byte Count
Registers
b1
b0
b1
b0
000b (8 bits)
Integer multiple
001b (16 bits)
Multiple of 2
0
0
010b (32 bits)
Multiple of 4
0
0
0
0
[Legend]
: Either 0 or 1
12.6.2
DMA Transfer to External Devices
When DMA transfer to an external device is performed, the DASTSm flag (m = 0 to 3) in DMASTS is cleared to 0 (data
transfer is not in progress) before the external bus access ends after the final data write is started in some cases.