Figure 6.8-10 Pwm Up-Down Counter Type - Nuvoton ISD94124BYI Technical Reference Manual

Isd arm cortex-m4f soc
Table of Contents

Advertisement

CNT
(PWM_CNTn[15:0])
DIRF
(PWM_CNTn[16])
CNTENn
(PWM_CNTEN[n])
zero point event
center point event
Note1: When in up-down count type, period interrupt flag occurs at center point event.
Note2: n denotes channel 0,1..5
6.8.5.6
PWM Comparator
There are two kinds of comparator registers : one is CMPDATn(n = 0,1..5), and the other is
FTCMPDATn_m(n = 0,2,4, m = 1,3,5) register. CMPDATn is a basic comparator register of PWM
channel n; In Independent mode each channel only has one comparator, the value of CMPDATn
register is continuously compared to the corresponding channel's counter value. In Complementary
mode each paired channels has two comparators, and the value of CMPDATn and CMPDATm (n
= 0,2,4, m = 1,3,5) registers are continuously compared to the complementary even channel's
counter value, because of odd channel's counter is useless. For example, channel 0 and channel
1 are complementary channels, in Complementary mode, channel 1's comparator is continuously
compared to channel 0's counter, but not channel 1's. When the counter is equal to value of
CMPDAT0 register, PWM generates a compared point event and uses the event to generate PWM
pulse, interrupt or use to trigger EADC. In up-down counter type, two events will be generated in a
PWM period as shown in Figure 6.8-11. The CMPU is up count compared point event and CMPD
is down count compared point event.
Sep 9, 2019
ISD94100 Series Technical Reference Manual
PERIOD = 4
4
3
3
2
2
1
1
1
0
0
X
PWM Period

Figure 6.8-10 PWM Up-Down Counter Type

Page 411 of 928
PERIOD = 7
7
6
6
5
5
4
4
3
3
2
2
PWM Period
4
3
2
1
1
0
Rev1.09

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents