16 16-BIT PWM TIMERS (T16A3)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
16-11
(Rev. 1.0)
Interrupt
16.5
Each T16A3 channel has a function to generate the interrupt shown in Table 16.5.1.
5.1 T16A3 Interrupt Function
Table 16.
Interrupt
Interrupt flag
Set condition
Clear condition
Capture B
overwrite
T16A
n
INTF.CAPBOWIF When the T16A
n
CCB register is overwritten in capture mode
with the T16A
n
INTF.CAPBIF bit set to 1
Writing 1
Capture A
overwrite
T16A
n
INTF.CAPAOWIF When the T16A
n
CCA register is overwritten in capture mode
with the T16A
n
INTF.CAPAIF bit set to 1
Writing 1
Capture B
T16A
n
INTF.CAPBIF
When the counter value is loaded to the T16A
n
CCB register by
a trigger input to CAPB
n
in capture mode
Writing 1
Capture A
T16A
n
INTF.CAPAIF
When the counter value is loaded to the T16A
n
CCA register by
a trigger input to CAPA
n
in capture mode
Writing 1
Compare B T16A
n
INTF.CMPBIF
When the counter value reaches the T16A
n
CCB register (or
compare B buffer) value in comparator mode
Writing 1
Compare A T16A
n
INTF.CMPAIF
When the counter value reaches the T16A
n
CCA register (or
compare A buffer) value in comparator mode
Writing 1
T16A3 provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the inter-
rupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set.
For more information on interrupt control, refer to the “Interrupt Controller” chapter.
Control Registers
16.6
T16a3 Ch.
n
Clock Control Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
T16A
n
CLK
15–9 –
0x00
–
R
–
8
DBRUN
0
H0
R/W
7–4 CLKDIV[3:0]
0x0
H0
R/W
3
–
0
–
R
2
MULTIMD
0
H0
R/W T16A3 Ch.0
–
0
–
R
T16A3 Ch.1–
n
1–0 CLKSRC[1:0]
0x0
H0
R/W –
Bits 15–9 Reserved
Bit 8
DBRun
This bit sets whether the T16A3 Ch.
n
operating clock is supplied in DEBUG mode or not.
1 (R/W): Clock supplied in DEBUG mode
0 (R/W): No clock supplied in DEBUG mode
Bits 7–4
ClKDiV[3:0]
These bits select the division ratio of the T16A3 Ch.
n
operating clock (counter clock).
Bit 3
Reserved
Bit 2
MulTiMD (T16a3 Ch.0)
This bit sets T16A3 to multi-comparator/capture mode.
1 (R/W): Multi-comparator/capture mode
0 (R/W): Normal channel mode
For detailed information, refer to “Comparator/Capture Block Operations, Multi-comparator/capture
mode and the counter channel used.”
Bit 2
Reserved (T16a3 Ch.1–
n
)
Bits 1–0
ClKSRC[1:0]
These bits select the clock source of T16A3 Ch.
n
.