
M0A21/M0A23 Series
May 06, 2022
Page
351
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
CNT
PWM period
Zero
CMPDATn
CMPDATm
Center
PWM period
CNT
PWM OUT
1
2
3
4
5
6
2. CMPUn = X
5. CMPDm = X
3. CMPUm = H
1. Zero = L
6. CMPDn = L
4. Center = X
Zero
CMPDATn
CMPDATm
Center
2. CMPUn = T
5. CMPDm = T
3. CMPUm = H
1. Zero = H
6. CMPDn = L
4. Center = L
Note:
Note:
PWM OUT
1
2
3
4
5
6
Figure 6.10-16 PWM Pulse Generation
The generation events may sometimes be set to the same value, as the reason, events priority between
different counter types are list below, up counter type (Table 6.10-2), down counter type (Table 6.10-3)
and up-down counter type (Table 6.10-4). By using event priority, user can easily generate 0% to 100%
duty pulse as shown in Figure 6.10-17.
0
1
2
3
4
3
2
1
0
1
2
3
4
3
2
1
0
CMPDAT = 0, 0% Duty
CMPDAT = 1, 25% Duty
CMPDAT = 2, 50% Duty
CMPDAT = 3, 75% Duty
CMPDAT = 4, 100% Duty
DIRF
PWM period
PWM period
0
1
2
3
4
0
1
2
3
4
CMPDAT = 0, 0% Duty
CMPDAT = 1, 20% Duty
CMPDAT = 2, 40% Duty
CMPDAT = 3, 60% Duty
CMPDAT = 4, 80% Duty
CMPDAT > 4,100% Duty
CMPU = L
Zero = H
PWM period
PWM period
CMPU = L
CMPD = H
Figure 6.10-17 PWM 0% to 100% Pulse Generation
Table 6.10-2 PWM Pulse Generation Event Priority for Up-Counter
Priority
Up Event
1 (Highest)
Period event (CNT = PERIOD)
2
Compare up event of odd channel (CNT = CMPUm)
3
Compare up event of even channel (CNT = CMPUn)
4 (Lowest)
Zero event (CNT = 0)