English
Language : 

UPD78F1502AGK-GAK-AX Datasheet, PDF (751/1031 Pages) Renesas Technology Corp – 16-Bit Single-Chip Microcontrollers
78K0R/Lx3
CHAPTER 18 DMA CONTROLLER
18.5.6 Holding DMA transfer pending by DWAITn
When DMA transfer is started, transfer is performed while an instruction is executed. At this time, the operation of the
CPU is stopped and delayed for the duration of 2 clocks. If this poses a problem to the operation of the set system, a
DMA transfer can be held pending by setting the DWAITn bit to 1. The DMA transfer for a transfer trigger that occurred
while DMA transfer was held pending is executed after the pending status is canceled. However, because only one
transfer trigger can be held pending for each channel, even if multiple transfer triggers occur for one channel during the
pending status, only one DMA transfer is executed after the pending status is canceled.
To output a pulse with a width of 10 clocks of the operating frequency from the P10 pin, for example, the clock width
increases to 12 if a DMA transfer is started midway. In this case, the DMA transfer can be held pending by setting the
DWAITn bit to 1.
After setting the DWAITn bit to 1, it takes two clocks until a DMA transfer is held pending.
Figure 18-12. Example of Setting for Holding DMA Transfer Pending by DWAITn
Starting DMA transfer
Main program
DWAITn = 1
Wait for 2 clocks
P10 = 1
Wait for 9 clocks
P10 = 0
DWAITn = 0
Caution
When DMA transfer is held pending while using both DMA channels, be sure to held the DMA
transfer pending for both channels (by setting DWAIT0 and DWAIT1 to 1). If the DMA transfer of
one channel is executed while that of the other channel is held pending, DMA transfer might not be
held pending for the latter channel.
Remarks 1. n: DMA channel number (n = 0, 1)
2. 1 clock: 1/fCLK (fCLK: CPU clock)
R01UH0004EJ0501 Rev.5.01
735
Jun 20, 2011