13 DMA CONTROLLER (DMAC)
13-10
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
(1) When the DMAC accepts a trigger (or pause status is released), it loads the control information of the channel
into the DMAC module.
(2) To allow the next trigger, the DMAC clears the trigger flag (TRG
x
/DMAC_TRG_FLG register) or the pause
flag (PAUSE
x
/DMAC_PAUSE_STAT register) according to the cause of the current DMA transfer.
(3) The DMAC checks to see if CHEN is set to 1 (DMA transfer enabled). It abort data transfer if CHEN is set to 0.
(4) If the source type specified in the control information is pointer (ST = 1), the DMAC read the contents of the
specified source address to determine the pointer to the source data.
(5) The DMAC reads the specified data unit from the source address into a buffer and then write it to the destina-
tion address.
The transfer status flag (RUN
x
/DMAC_RUN_STAT register) is set and retains 1 while data is being trans-
ferred.
(6) According to the control information, the DMAC increments the source and/or destination addresses. The ad-
dresses are not changed if “address fixed” is specified. Also the transfer counter is decremented.
(7) The DMAC checks the transfer counter. It goes to Step (10) if the transfer counter has reaches 0.
(8) The DMAC checks to see if any DMA request has been generated from other high-priority channels. If a high-
priority trigger flag is set, the DMAC sets the pause flag (PAUSE
x
) of the channel currently performing a
transfer and suspends the transfer. The suspended DMA transfer will resume after other high-priority DMA
transfers are completed.
(9) If no DMA request has issued from high-priority channels, the DMAC returns to Step (4) to transfer the next
data unit.
(10) The DMAC sets the end-of-transfer flag (ENDF
x
/DMAC_END_FLG register) and clears the transfer status
flag (RUN
x
). Also it writes the modified control information back to the control table. If DMAIE
x
/DMAC_IE
register is set to 1 (end-of-transfer interrupt enabled), the DMAC outputs an interrupt request to the ITC.
This completes the successive transfer process.
Suspending successive transfers due to other high-priority DMA request
Successive transfers can be temporarily suspended due to occurrence of a high-priority DMA request.
When a high-priority DMA request is generated, the channel performing a transfer saves control information
required for resuming transfers (such as the current transfer count and the transfer source and destination ad-
dresses) as soon as the current data unit transfer is completed and then suspends transfers. At the same time, the
pause flag (PAUSE
x
/DMAC_PAUSE_STAT register) in the suspended channel is set.
After that, the higher-priority DMA transfer is executed. After the transfer is completed, the suspended DMA
transfer is resumed by PAUSE
x
that has been set. PAUSE
x
is cleared when the DMA transfer is resumed.
Notes: • Single transfers cannot be suspended.
• The software triggered high-priority DMA request can not suspend any low-priority DMA trans-
fer being performed.
DMAC Interrupt
13.6
The DMAC module includes a function for generating interrupts upon completion of a data transfer.
For the interrupts generated from trigger sources, see the descriptions of the peripheral modules.
End-of-transfer interrupt
This cause of interrupt occurs when a transfer in a channel has completed (when the transfer counter has reach-
es 0) and sets ENDF
x
/DMAC_END_FLG register corresponding to the channel to 1.
To use this interrupt, set DMAIE
x
/DMAC_IE register to 1. When DMAIE
x
is set to 0 (default), interrupt re-
quests for this interrupt cause are not sent to the interrupt controller (ITC).
If ENDF
x
is set to 1 while DMAIE
x
is set to 1 (interrupt enabled), the DMAC module outputs an interrupt re-
quest to the ITC. An interrupt is generated if the ITC and C33 PE Core interrupt conditions are satisfied.