Renesas RL78 Series User Manual page 678

16-bit single-chip microcontrollers
Hide thumbs Also See for RL78 Series:
Table of Contents

Advertisement

RL78/G1D
17.5.4 Holding DMA transfer pending by DWAITn bit
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 17-10. Example of Setting for Holding DMA Transfer Pending by DWAITn Bit
Caution
When DMA transfer is held pending while using two or more DMA channels, be sure to hold
the DMA transfer pending for all channels (by setting DWAIT0, DWAIT1, DWAIT2, and DWAIT3
to 1). If the DMA transfer of one channel is executed while the DMA transfer of the other
channels is held pending, DMA transfer might not be held pending for the other channels.
Remarks 1. n: DMA channel number (n = 0 to 3)
2. 1 clock: 1/f
R01UH0515EJ0120 Rev.1.20
Dec 16, 2016
Starting DMA transfer
Main program
DWAITn = 1
Wait for 2 clocks
P10 = 1
Wait for 9 clocks
P10 = 0
DWAITn = 0
(f
: CPU clock)
CLK
CLK
CHAPTER 17 DMA CONTROLLER
657

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rl78/g1dR5f11aggR5f11aghR5f11agj

Table of Contents