ISD94100 Series Technical Reference Manual
Sep 9, 2019
Page
352
of 928
Rev1.09
IS
D
9
410
0
S
ER
IE
S
T
E
C
HN
ICA
L
RE
F
E
RE
NCE
M
AN
U
AL
0
1
2
3
4
5
0
1
2
3
4
5
6
7
8
0
1
2
3
4
5
6
7
8
6
7
8
PWM Period
PWM Period
PWM Period
PERIOD = 5
PERIOD = 8
PERIOD = 8
zero point event
period point event
PWMCNT
(TIMERx_PWMCNT[15:0])
PWMCNTEN
(TIMERx_PWMCTL[0])
Figure 6.7-15 PWM Down Count Type
6.7.6.5
Up-Down Count Type
When PWM counter is set to up-down count type, CNTTYPE (TIMERx_PWMCTL[2:1]) is 0x2, it
starts counting up from zero to PERIOD and then starts counting down to zero. The current counter
value can be read from CNT (TIMERx_PWMCNT[15:0]). PWM generates a zero point event when
both counter and prescale counts to 0. PWM generates a center point event when the counter
counts to PERIOD and prescale counts to 0. Figure 6.7-16 shows an example of PWM up-down
count type, where PWM period time is (2 * PERIOD) * (1) * TMRx_PWMCLK. The DIRF
(TIMERx_PWMCNT[16]) is counter direction indicator flag, where 1 is up counting, and 0 is down
counting.
PWMDIRF
(TIMERx_PWMCNT[16])
0
1
2
3
4
3
1
2
0
1
2
3
4
3
1
2
0
5
6
7
6
4
5
1
2
3
4
PWM Period
PERIOD = 4
PERIOD = 7
PWM Period
zero point event
center point event
PWMCNT
(TIMERx_PWMCNT[15:0])
PWMCNTEN
(TIMERx_PWMCTL[0])
Note:
When in up-down count type, period interrupt flag occurs at center point event.
Figure 6.7-16 PWM Up-Down Count Type