14 16-BIT PWM TIMERS (T16B)
14-22
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
14.5 Interrupt
Each T16B channel has a function to generate the interrupt shown in Table 14.5.1.
Table 14.5.1 T16B Interrupt Function
Interrupt
Interrupt flag
Set condition
Clear condition
Capture
overwrite
T16BnINTF.CAPOWmIF When the T16BnINTF.CMPCAPmIF bit =1 and the T16Bn
CCRm register is overwritten with new captured data in
capture mode
Writing 1
Compare/
capture
T16BnINTF.CMPCAPmIF When the counter value becomes equal to the compare buf-
fer value in comparator mode
When the counter value is loaded to the T16BnCCRm regis-
ter by a capture trigger input in capture mode
Writing 1
Counter MAX T16BnINTF.CNTMAXIF
When the counter reaches the MAX value
Writing 1
Counter zero T16BnINTF.CNTZEROIF When the counter reaches 0x0000
Writing 1
T16B provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the interrupt
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.
14.6 Control Registers
T16B Ch.
n
Clock Control Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
T16BnCLK
15–9 –
0x00
–
R
–
8
DBRUN
0
H0
R/W
7–4 CLKDIV[3:0]
0x0
H0
R/W
3
–
0
–
R
2–0 CLKSRC[2:0]
0x0
H0
R/W
Bits 15–9 Reserved
Bit 8
DBRUN
This bit sets whether the T16B 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 T16B Ch.
n
operating clock (counter clock).
Bit 3
Reserved
Bits 2–0
CLKSRC[2:0]
These bits select the clock source of T16B Ch.
n
.