17-15
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
3.4)
T16B_
n
CCCTL
m
.CBUFMD[2:0] bits = 0x3
3.5)
T16B_
n
CCCTL
m
.CBUFMD[2:0] bits = 0x4
Figure 17.4.3.2 Compare Buffer Operations
Compare period and count cycle settings using DMA
By setting the T16B_
n
CC
m
DMAEN.CC
m
DMAEN
x
bit to 1 (DMA transfer request enabled) in
compara- tor mode, a DMA transfer request is sent to the DMA controller and compare data is
transferred from the specified memory to the T16B_
n
CCR
m
register via DMA Ch.
x
when the
T16B_
n
INTF.CMPCAP
m
IF bit is set to 1 (when the counter reaches the compare buffer value).
Similarly, by setting the T16B_
n
CC
m
DMAEN.MZDMAEN
x
bit to 1 (DMA transfer request
enabled), a DMA transfer request is sent to the DMA controller and a counter MAX value is
transferred from the specified memory to the T16B_
n
MC register via DMA Ch.
x
when the
T16B_
n
INTF.CNTMAXIF bit is set to 1 (when the counter reaches the MAX value) in up or up/down
count mode, or when the T16B_
n
INTF. CNTZEROIF bit is set to 1 (when the counter reaches zero) in
down count mode.
This automates the compare period and count cycle settings of the timer counter.
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 so that the setting data
will be transferred to the T16B_
n
CCR
m
or T16B_
n
MC register. For more information on DMA, refer to
the
“DMA
Controller”
chapter.
CMPCAPmIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
CNTZEROIF = 1
Data (W)
→
CC[15:0]
Data (W)
→
CC[15:0]
MODEN = 1
PRESET = 1
Data (W)
→
MC[15:0]
0xffff
0x0000
Counter
MAX value
(T16B_nMC register)
Time
Data (W)
→
CC[15:0]
Compare buffer
value
Count cycle
Compare period
during counting up
CNTMAXIF = 1
RUN = 1
Compare period
during counting
down
CNTZEROIF = 1
CNTMAXIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
CNTZEROIF = 1
Data (W)
→
CC[15:0]
Data (W)
→
CC[15:0]
MODEN = 1
PRESET = 1
Data (W)
→
MC[15:0]
0xffff
0x0000
Counter
MAX value
(T16B_nMC register)
Time
Data (W)
→
CC[15:0]
Compare buffer
value
Count cycle
Compare period
during counting up
CNTMAXIF = 1
RUN = 1
Compare period
during counting
down
CNTMAXIF = 1
CMPCAPmIF = 1
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 ...