13 DMA CONTROLLER (DMAC)
13-6
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
SRADR[31:0]: Source address (D[31:0]/2nd word)
Set the start address of the transfer source (or the pointer to the transfer source). This setting is updated accord-
ing to the setting of SRINC[1:0].
DSADR[31:0]: Destination address (D[31:0]/3rd word)
Set the start address of the transfer destination. This setting is updated according to the setting of DSINC[1:0].
PTBASE[31:16]: Pointer base address (D[31:16]/4th word)
Set the pointer base address (see ST) when pointer is selected for the source type. The low-order 16 bits of the
base address are fixed at 0x0 (D[15:0] is ignored).
Auto-Reload Data
13.3.3
As shown in Figure 13.3.1.1, a RAM area is allocated to an auto-reloading data area for each channel along with
the control table. When the auto-reload function is enabled by setting RELOAD (D1/1st word) to 1, the contents of
the auto-reloading data area will be reset on the control table when the transfer counter reaches 0, enabling transfers
with the new conditions to be executed without setting of the conditions in the DMAC interrupt handler routine.
The four words (32 bytes) in the auto-reloading area are handled as exactly the same bit configuration as the four
words on the control table. The auto-reloading area can be used as a control information buffer. Before using a
DMAC channel with the auto-reload function, write the first transfer conditions with RELOAD set to 1 to the con-
trol table and the second transfer conditions to the auto-reloading area. The control information written to the auto-
reloading area is loaded to the control table upon completion of the first data transfer and it will control the second
data transfer. If the auto-reload function is not used, the control table must be reset to the subsequent transfer condi-
tions in the DMAC interrupt handler routine.
The address of the auto-reload data area can be calculated from the equation below.
Start address of auto-reloading data area = base a (channel number
×
32) + 16
DMAC Invocation
13.4
The triggers by which DMA is invoked have the following two causes:
1. Software trigger via register control
2. Hardware trigger due to a cause of interrupt in internal peripheral modules
Enabling DMAC
Each DMAC channel enters ready-to-operate status by setting DMAON
x
/DMAC_CH_EN register to 1. When
DMAON
x
is 0 (default), the DMA channel does not accept triggers even if the control information enables
transfers.
Enabling DMA transfers
Writing 1 to the CHEN bit (D3/1st word) on the control table enables DMA transfers in that channel, making it
ready to accept triggers.
DMAC invocation by a software trigger
Any DMAC channel can be invoked via software. In order to invoke DMA transfer using Ch.
x
, write 1 to
TRG
x
/DMAC_TRG_FLG register.
TRG
x
retains 1 until the DMA request is accepted and then it is reset to 0 by the hardware. TRG
x
is also set to
1 by a hardware trigger.
DMAC invocation by a cause of interrupt in internal peripheral modules
To respective channels of the DMAC, hardware trigger sources (causes of interrupt in peripheral modules)
shown in Table 13.4.1 are assigned, which can be selected with the TRG_SEL
x
[1:0]/DMAC_TRG_SEL regis-
ter.