17-16
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
Table 17.4.3.1 DMA Data Structure Configuration Example (T16B Compare Period and Count Cycle Settings)
Item
Setting example
End pointer
Transfer source
Memory address in which the last setting data is
stored
Transfer
destination
T16B_
n
CCR
m
or T16B_
n
MC register address
Control data
dst_inc
0x3 (no increment)
dst_size
0x1 (haflword)
src_inc
0x1 (+2)
src_size
0x1 (halfword)
R_power
0x0 (arbitrated for every transfer)
n_minus_1
Number of transfer data
cycle_ctrl
0x1 (basic transfer)
Operations in capture mode
The capture mode captures the counter value when an external event, such as a key entry, occurs (at
the specified edge of the external input/software trigger signal). In this mode, the T16B_
n
CCR
m
register functions as the capture register from which the captured data is read. Furthermore, the
TOUT
nm
/CAP
nm
pin is configured to the CAP
nm
pin.
The trigger signal and the trigger edge to capture the counter value are selected using the
T16B_
n
CCCTL
m
. CAPIS[1:0] bits and the T16B_
n
CCCTL
m
.CAPTRG[1:0] bits, respectively.
When a specified trigger edge is input during counting, the current counter value is loaded to the
T16B_
n
CCR
m
register. At the same time the T16B_
n
INTF.CMPCAP
m
IF bit is set. The interrupt occurred
by this bit can be used to read the captured data from the T16B_
n
CCR
m
register. For example,
external event cycles and pulse widths can be measured from the difference between two captured
counter values read.
If the captured data stored in the T16B_
n
CCR
m
register is overwritten by the next trigger when
the T16B_
n
INTF.CMPCAP
m
IF bit is still set, an overwrite error occurs (the T16B_
n
INTF.CAPOW
m
IF bit is set).
Figure 17.4.3.3 Operations in Capture Mode (Example in One-shot Up Count Mode)
CMPCAPmIF = 1
Counter value CC[15:0]
Counter value CC[15:0]
Counter value CC[15:0]
CMPCAPmIF = 1
CAPOWmIF = 1
CC[15:0]
→
Data (R)
CMPCAPmIF = 1
CC[15:0]
→
Data (R)
CMPCAPmIF = 0
RUN = 1
MODEN = 1
PRESET = 1
0xffff
0x0000
Counter
Time
Captured value
(T16B_
n
CCR
m
register)
Software operation
Hardware operation
T16B_
n
CCCTL
m
.CAPTRG[1:0] bits = 0x3 (Trigger: falling and rising edges)
Summary of Contents for S1C31D50
Page 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Page 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Page 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Page 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...