13 16-BiT PWM TiMeRS (T16a2)
13-10
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
PWM waveform output timings
normal clock mode (hCM = 0)
Count clock
T16A_TC
x
TOUTA
x
/TOUTB
x
T16A_CCA
x
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
n
0
0
1
2
n-1
n
0
1
1
2
n-2
n-1
(n = T16A_CCB
x
)
Count clock
T16A_TC
x
TOUTA
x
/TOUTB
x
Example: HCM = 0, T16A_CCA
x
= 1, and T16A_CCB
x
= 5
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
5
0
1
2
4
5
0
1
3
6.3 PWM Waveform Output Timings in Normal Clock Mode
Figure 13.
half clock mode (hCM = 1)
Count clock
T16A_TC
x
Dual-edge counter
TOUTA
x
/TOUTB
x
T16A_CCA
x
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
n
2n
0
–
0
0
1
2
3
4
2n-3 2n-2 2n-1
2n
–
0
1
1
2
n-1
n
0
1
1
2
3
4
2n-4 2n-3 2n-2 2n-1
(n = T16A_CCB
x
)
Count clock
T16A_TC
x
Dual-edge counter
TOUTA
x
/TOUTB
x
Example: HCM = 1, T16A_CCA
x
= 1, and T16A_CCB
x
= 5
(When TOUTAMD[1:0] = TOUTBMD[1:0] = 0x1 and TOUTAINV = TOUTBINV = 0)
5
10
0
–
0
1
2
3
4
7
8
9
10
–
0
1
1
2
4
5
0
1
5
6
3
6.4 PWM Waveform Output Timings in Half Clock Mode
Figure 13.
T16a2 interrupts
13.7
The T16A2 module can generate the following six kinds of interrupts:
• Compare A interrupt (in comparator mode)
• Compare B interrupt (in comparator mode)
• Capture A interrupt (in capture mode)
• Capture B interrupt (in capture mode)
• Capture A overwrite interrupt (in capture mode)
• Capture B overwrite interrupt (in capture mode)
Each timer channel outputs a single interrupt signal shared by the above interrupt causes to the interrupt controller
(ITC). Read the interrupt flags in the T16A2 module to identify the interrupt cause that has been occurred.