
CHAPTER 20 DMA FUNCTIONS (DMA CONTROLLER)
Preliminary User’s Manual U16541EJ1V0UM
730
20.11 Precautions
(1) Memory boundary
The transfer operation is not guaranteed if the source or the destination address exceeds the area of DMA
objects (external memory, internal RAM, or on-chip peripheral I/O) during DMA transfer.
(2) Transfer of misaligned data
DMA transfer of 16-bit bus width misaligned data is not supported.
(3) Times related to DMA transfer
The overhead before and after DMA transfer and the minimum execution clock for DMA transfer are shown
below.
Internal RAM access: 2 clocks
Note that for external memory access, the time depends on the type of external memory connected.
(4) Bus arbitration for CPU
The CPU can access external memory, on-chip peripheral I/O, and internal RAM not undergoing DMA transfer.
While data transfer among external memories or to and from I/O is being performed, the CPU can access
internal RAM.
(5) Notes on INITn bit (n = 0 to 3) of DMA channel control registers 0 to 3 (DCHC0 to DCHC3)
When a channel executing DMA transfer is to be initialized, the channel may not be initialized even if the INITn
bit is set to 1. To accurately initialize the channel, execute either of the following two procedures.
(a) To temporarily stop transfer of all DMA channels
[Procedure]
<1> Disable interrupts (DI status).
<2> Read the Enn bit of the DCHCn register of the DMA channels other than the one to be forcibly
stopped, and transfer the value of that bit to a general-purpose register.
<3> Clear the Enn bit of the DMA channels being used (including the channel to be forcibly stopped).
Execute the instruction that clears the Enn bit twice if the channel is the last DMA channel. If data is
to be transferred from or to the internal RAM at this time, execute the instruction three times.
For example, execute the following instructions when channels 0, 1, and 2 are being used.
Clear E00 bit of DCHC0 register (to 0)
Clear E11 bit of DCHC1 register (to 0)
Clear E22 bit of DCHC2 register (to 0)
Clear E22 bit of DCHC2 register (to 0) again
<4> Set the INITn bit of the channel to be forcibly stopped.
<5> If both the TCn bit and Enn bit of the channels not to be stopped forcibly are 1 (if the result of
ANDing is 1) as a result of step <2> above, clear the Enn bit that has been saved (to 0).
<6> Write the Enn bit to the DCHCn register after the operation in step <5> above.
<7> Enable interrupts (EI status).
Caution
Be sure to perform step <5> above to prevent the Enn bit of the channels that have been
completed normally in steps <2> or <3> from being illegally set again.