16. DMA Controller (DMACA)
16.3.7
Activating the DMACA
Figure 16.12
Register Setting Procedure
DM[1:0] bits in DMACm.DMAMD
SM[1:0] bits in DMACm.DMAMD
DARA[4:0] bits in DMACm.DMAMD
SARA[4:0] bits in DMACm.DMAMD
m: DMAC channel (m = 0 to 3)
Set the transfer source start address.
DMACm.DMSAR
Set the control register for the peripheral function without
starting it.
DCTG[1:0] bits in DMACm.DMTMD
SZ[1:0] bits in DMACm.DMTMD
DTS[1:0] bits in DMACm.DMTMD
MD[1:0] bits in DMACm.DMTMD
Set the transfer destination start address.
DMACm.DMCRA
Set the offset value.
DMACm.DMOFR
<To use DMA transfer end interrupts>
Set 1 to DTIE bit in DMACm.DMINT.
Set DTE bit in DMACm.DMCNT to 1.
Set DMST bit in DMAST to 1.
Enable DMA transfer end interrupts.
Set the peripheral module as a DMACm request
source.
Enable DMA transfer.
Enable DMACA operation.*1
DMACm.DMCRB
Start the peripheral function as a DMACm request
source.
Transfer destination address update mode bits
Transfer source address update mode bits
Destination address extended repeat area bits
Source address extended repeat area bits
Clear the DTE bit in DMACm.DMCNT to 0.
Disable DMA transfers.
Set the IRQ pin function without enabling it.
Set the IRQ pin function using the interrupt
controller unit (ICUA).
Set the interrupt request as a DMA request source
in the DMACA activation source select register
(ICU.DMRSRm) using the ICUA.
Set the DMACA activation source.
Enable the IRQ pin as a DMACm request source.
Transfer request select bits
Data transfer size bits
Repeat area select bits
Transfer mode select bits
DMACm.DMDAR
Set the number of transfer operations.
<To use block transfer mode or repeat transfer mode>
Set the number of block transfer operations.
<To use the address update function with offset>
<To use DMA transfer escape interrupts>
RPTIE bit in DMACm.DMINT
SARIE bit in DMACm.DMINT
DARIE bit in DMACm.DMINT
Set the ESIE bit in DMACm.DMINT to 1.
Set the repeat size end interrupt
Set the transfer source address extended repeat area overflow interrupt
Set the transfer destination address extended repeat area overflow interrupt
Enable the DMA transfer escape end interrupt
<For activation other than by software>
Clear the interrupt enable bit (ICU.IERn.IENj) as an activation
source to 0, then perform the settings below.
Enable the interrupt bit for
the activation source.
Set IENj bit in ICU.IERn to 1.
<For activation by software>
On completion of the initial settings, writing 1 to the DMA software
activation bit (DMACm.DMREQ.SWREQ) starts DMA transfer.
<To use peripheral function
interrupts as DMA activation
sources>
<To use external pin interrupts as
DMA activation sources>
<To use on-chip peripheral
interrupts or external pin
interrupts as DMA activation
sources>
<To use peripheral function
interrupts as DMA activation
sources>
<To use external pin interrupts as
DMA activation sources>
<To use on-chip peripheral
interrupts or external pin
interrupts as DMA activation
sources>
Start of initial settings
End of initial settings
Settings required for
each activation source
Common settings
for DMACA
Note 1.
Setting of the DMAST.DMST bit doesn't necessarily have to follow the settings for the individual activation sources.