
M0A21/M0A23 Series
May 06, 2022
Page
359
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
PWM_WGCTL0
PWM_WGCTL1
PWM_CH0
PWM_CH1
off
on
on
off
off
off
on
off
(PINV0=0)
(PINV1=0)
Dead-time insertion; It is only effective in complementary mode
Note
: PINVx: Negative Polarity control bits; It controls the PWM
output initial state and polarity, x denotes 0 or 1.
PWM_CH0
PWM_CH1
PWM_CH0
PWM_CH1
PWM_CH0
PWM_CH1
(PINV0=1)
(PINV1=0)
(PINV0=0)
(PINV1=1)
(PINV0=1)
(PINV1=1)
Initial State
PWM Starts
on
off
off
on
off
off
on
off
off
on
on
off
off
off
on
off
off
off
on
off
on
off
off
on
Figure 6.10-30 Initial State and Polarity Control with Rising Edge Dead-Time Insertion
6.10.5.21 Synchronous start function
The synchronous start function can be enabled when SSEN0 (PWM_SSCTL[0]) is set. User can select
synchronous source which is from PWM0 by SSRC (PWM_SSCTL[9:8]). The selected PWM channels
(include channel0 to channel5 of PWM) will start counting at the same time once the synchronous start
function is enabled and set CNTSEN (PWM_SSTRG). It is noted that set CNTSEN (PWM_SSTRG) will
also set the counter enable bit (CNTENn, n denotes channel 0 to 5) to start counting.
6.10.5.22 PWM Interrupt Generator.
There are three independent interrupts for each PWM as shown in Figure 6.10-31.
The 1
st
PWM interrupt (PWM_INT) comes from PWM complementary pair events. The counter can
generate the Zero point Interrupt Flag ZIFn (PWM_INTSTS0[n], n=0,2,4) and the Period point Interrupt
Flag PIFn (PWM_INTSTS0[n+8], n=0,2,4). When PWM channel
n’s counter equals to the comparator
value stored in PWM_CMPDATn, the different interrupt flags will be triggered depending on the counting
direction. If the matching occurs at up-count direction, the Up Interrupt Flag CMPUIFn
(PWM_INTSTS0[21:16]) is set and if matching at the opposite direction, the Down Interrupt Flag
CMPDIFn (PWM_INTSTS0[29:24]) is set. If the corresponding interrupt enable bits are set, the trigger
events will generates interrupt signals.
The 2
nd
interrupt is the capture interrupt (CAP_INT). It shares the PWM_INT vector in NVIC. The
CAP_INT can be generated when the CRLIFn (PWM_CAPIF[5:0]) is triggered and the Capture Rising
Interrupt Enable bit CAPRIENn (PWM_CAPIEN[5:0]) is set to 1. Or in the falling edge condition, the
CFLIFn (PWM_CAPIF[13:8]) can be triggered when the Capture Falling Interrupt Enable bit CAPFIENn
(PWM_CAPIEN[13:8]) is set to 1.
The last one is the brake interrupt (BRK_INT). The detail of the BRK_INT is described in the PWM Brake
section.