17 16-BIT PWM TIMERS (T16B)
S1C31D50/D51 TECHNICAL MANUAL
Seiko Epson Corporation
17-17
(Rev. 2.00)
Capture data transfer using DMA
By setting the T16B_
n
CC
m
DMAEN.CC
m
DMAEN
x
bit to 1 (DMA transfer request enabled) in capture
mode, a DMA transfer request is sent to the DMA controller and the T16B_
n
CCR
m
register value is trans-
ferred to the specified memory via DMA Ch.
x
when the T16B_
n
INTF.CMPCAP
m
IF bit is set to 1 (when
data has been captured).
This automates reading and saving of capture data.
The transfer source/destination and control data must be set for the DMA controller and the relevant DMA
channel must be enabled to start a DMA transfer in advance. For more information on DMA, refer to the
“DMA Controller” chapter.
Table 17.4.3.2 DMA Data Structure Configuration Example (Capture Data Transfer)
Item
Setting example
End pointer Transfer source
T16B_nCCRm register address
Transfer destination Memory address to which the last capture data is stored
Control data dst_inc
0x1 (+2)
dst_size
0x1 (haflword)
src_inc
0x3 (no increment)
src_size
0x1 (halfword)
R_power
0x0 (arbitrated for every transfer)
n_minus_1
Number of transfer data
cycle_ctrl
0x1 (basic transfer)
17.4.4 TOUT Output Control
Comparator mode can generate TOUT signals using the comparator MATCH and counter MAX/ZERO signals. The
generated signals can be output to outside the IC. Figure 17.4.4.1 shows the TOUT output circuits (circuits 0 and 1).
TOUT
output control
0
Comparator 0
ZERO signal
MAX signal
MATCH signal
T16B_nCCCTL0 register
T16B_nCCCTL1 register
TOUTn0
Comparator/capture block Ch.n
TOUTMD[2:0]
TOUTO
TOUTMT
TOUTINV
TOUT
output control
1
Comparator 1 MATCH signal
TOUTn1
TOUTMD[2:0]
TOUTO
TOUTMT
TOUTINV
Figure 17.4.4.1 TOUT Output Circuits (Circuits 0 and 1)
Each timer channel includes two (four, or six) TOUT output circuits and their signal generation and output can be
controlled individually.
TOUT generation mode
The
T16B_
n
CCCTL
m
.TOUTMD[2:0] bits are used to set how the TOUT signal waveform is changed by the
MATCH and MAX/ZERO signals.
Furthermore, when the T16B_
n
CCCTL
m
.TOUTMT bit is set to 1, the TOUT circuit uses the MATCH signal
output from another system in the circuit pair (0 and 1, 2 and 3, 4 and 5). This makes it possible to change the
signal twice within a counter cycle.