13 DMA CONTROLLER (DMAC)
13-14
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
Channel
Control bits
Setting
Trigger source
Channel priority
Ch.2
TRG_SEL2[1:0]
0x3
16-bit PWM timer (T16A5) Ch.
x
compare/capture B
*
0x2
FSIO Ch.0 receive buffer full
0x1
USI receive buffer full
0x0
Hardware trigger disabled (software trigger only)
Ch.1
TRG_SEL1[1:0]
0x3
USB interrupt
0x2
Port input interrupt 0–3
0x1
I
2
S R channel FIFO empty
0x0
Hardware trigger disabled (software trigger only)
Ch.0
TRG_SEL0[1:0]
0x3
A/D converter (ADC10) conversion completion
0x2
16-bit audio PWM timer (T16P) buffer empty
0x1
I
2
S L channel FIFO empty
↓
0x0
Hardware trigger disabled (software trigger only)
High
*
Set the T16A5 channel for invoking the DMAC using DMASEL[1:0]/T16A_CTL
x
register.
(Default: 0x0)
At initial reset, TRG_SEL
x
[1:0] in all channels are set to 0x0 (hardware trigger disabled). Note that
software triggers are enabled regardless of the trigger source selected.
DMAC Trigger Flag Register (DMAC_TRG_FLG)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
DMAC Trigger
Flag Register
(DMAC_TRG_
FLG)
0x302110
(32 bits)
D31–8 –
reserved
–
–
–
0 when being read.
D7
TRG7
Ch.7 software trigger/trigger status 1
(W)
Soft trigger
0
(W)
Ignored
0
R/W
D6
TRG6
Ch.6 software trigger/trigger status
0
R/W
D5
TRG5
Ch.5 software trigger/trigger status
0
R/W
D4
TRG4
Ch.4 software trigger/trigger status
0
R/W
D3
TRG3
Ch.3 software trigger/trigger status
(R)
Triggered
(R)
Not triggered
0
R/W
D2
TRG2
Ch.2 software trigger/trigger status
0
R/W
D1
TRG1
Ch.1 software trigger/trigger status
0
R/W
D0
TRG0
Ch.0 software trigger/trigger status
0
R/W
D[31:8] Reserved
D[7:0]
TRG
x
: Ch.
x
Software Trigger/Trigger Status Bit
Invokes a DMA of the specified channel by software trigger. Also indicates trigger status in respective
channels, including hardware trigger.
1 (W):
Software trigger
0 (W):
Ignored
1 (R):
Triggered
0 (R):
Not triggered (default)
To use software trigger to start a Ch.
x
DMA transfer, write 1 to TRG
x
. In the case of a hardware trigger,
the DMA transfer starts after TRG
x
is set to 1.
Among DMAC channels, Ch.0 is assigned the highest priority, which goes down in the ascending order
of channels numbers. Therefore, when there are multiple settings of TRG
x
, channels with lower channel
numbers are processed before the higher-number channels. Lower-priority channels are kept pending
until all DMA transfers in higher-priority channels are completed, and TRG
x
also retains 1. The above
applies to cases where another trigger is generated during a DMA transfer. That is, regardless of the
order of trigger generation, a DMA request from the highest-priority channel is accepted as soon as the
current DMA transfer is completed or suspended.
After the DMAC accepts a trigger, the DMA transfer of the channel starts. At the same time TRG
x
is
cleared, allowing the channel to be re-triggered.
Note that acceptance of the trigger does not start a DMA transfer if CHEN (D3/1st word) in control in-
formation is set to 0.
If DMAON
x
/DMAC_CH_EN register is set to 0 (forced termination), TRG
x
that has been set is cleared
and the pending DMA request is canceled.