
M0A21/M0A23 Series
May 06, 2022
Page
354
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
Figure 6.10-21 PWMx_CH0 and PWMx_CH1 Output Control in Complementary Mode
6.10.5.17 Dead-Time Insertion
In the complementary application, the complement channels may drive the external devices like power
switches. The dead-
time generator inserts a low level period called “dead-time” between complementary
outputs to drive these devices safely and to prevent system or devices from the burn-out damage. Hence
the dead-time control is a crucial mechansism to the proper operation of the complementary system. By
setting corresponding channel n DTEN (PWM_DTCTLn_m[16]) bit to enable dead-time function and
DTCNT (PWM_DTCTLn_m[11:0]) to control dead-time period, the dead-time can be calculated from the
following formula:
Dead-time = (DTCNT (PWM_DTCTLn[11:0])+1) * PWMx_CLK period
Dead-time insertion clock source can be selected from prescaler output by setting DTCKSEL
(PWM_DTCTLn_m[24]) to 1. By default, clock source comes from PWM_CLK, which is prescaler input.
Then the dead-time can be calculated from the following formula:
Dead-time = (DTCNT (PWM_DTCTLn[11:0])+1) *
(CLKPSC (PWM_CLKPSCn [11:0])+1)*PWMx_CLK period
Please note that the PWM_DTCTLn_m are write-protected registers.
Figure 6.10-22 indicates the dead-time insertion for one pair of PWM signals.
PWM_CH0 without
Dead-Time
PWM_CH1 without
Dead-Time
PWM_CH0 with
Dead-Time
PWM_CH1 with
Dead-Time
Dead-Time
Interval
Effect of Dead-Time for complementary pairs
Figure 6.10-22 Dead-Time Insertion
6.10.5.18 PWM Mask Output Function
Each of the PWM channel output value can be manually overridden with the settings in the PWM Mask
Enable Control Register (PWM_MSKEN) and the PWM Masked Data Register (PWM_MSK). With these
settings, the PWM channel outputs can be assigned to specified logic states independent of the duty
cycle comparison units. The PWM mask bits are useful when controlling various types of Electrically
Commutated Motor (ECM) like a BLDC motor. The PWM_MSKEN register contains six bits,
MSKENn(PWM_MSKEN[5:0]). If the MASKENn is set to active-high, the PWM channel n output will be
overridden. The PWM_MSK register contains six bits, MSKDATn(PWM_MSK[5:0]). The bit value of the
MSKDATn determines the state value of the PWM channel n output when the channel is overridden.
Figure 6.10-23 shows an example of how PWM mask control can be used for the override feature.