
M0A21/M0A23 Series
May 06, 2022
Page
355
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
PWM_CH2
PWM_CH0
PWM_MSK
[5:0]
0x8
0x11
0x5
PWM_MSKEN
[5:0]
PWM_CH1
PWM_CH3
0x2A (Mask channel 1, 3, 5)
0x15 (Mask channel 0, 2, 4)
PWM_CH4
PWM_CH5
Figure 6.10-23 Illustration of Mask Control Waveform
6.10.5.19 PWM Brake
Each PWM module has two external input brake control signals. User can select active brake pin source
is from PWMx_BRAKEy pin by BKxSRC bits of BNF register(x=0,1, y=0,1). The external signals will be
filtered by a 3-bit noise filter. User can enable the noise filter function by BRKxNFEN bits of BNF reigster,
and noise filter sampling clock can be selected by setting BRKxNFSEL bits of BNF register to fit different
noise properties. Moreover, by setting the BRKxFCNT bits, user can define by how many sampling clock
cycles a filter will recognize the effective edge of the brake signal.
In addition, it can be inversed by setting the BRKxPINV (x denotes input external pin 0 or 1) bits of BNF
register to realize the polarity setup for the brake control signals. Set BRKxPINV bit to 0, brake event
will occurred when PWMx_BRAKEy(x=0,1, y=0,1) pin status is from low to high; set BRKxPINV to 1,
brake event will occurred when PWMx_BRAKEy pin status is from high to low.
8
t
o
1
M
U
X
HCLK
HCLK/2
HCLK/4
HCLK/8
HCLK/16
HCLK/32
HCLK/64
HCLK/128
BRKxNFSEL
(PWM_BNF[3:1] for BKP0)
(PWM_BNF[11:9] for BKP1)
Noise filter
counter 3-bits
BRKxFCNT
(PWM_BNF[6:4] for BKP0)
(PWM_BNF[14:12] for BKP1)
PWMx_BRAKEy
BRKxPINV
(PWM_BNF[7] for BKP0)
(PWM_BNF[15] for BKP1)
0
1
Brake Source
Note:
x,y denotes 0 or 1
0
1
2
3
4
5
6
7
BRKxNFEN
(PWM_BNF[0] for BKP0)
(PWM_BNF[8] for BKP1)
Sampling Clock
3
3
Figure 6.10-24 Brake Noise Filter Block Diagram
For Complementatry mode, it is often necessary to set a safe output state to the complement output
pairs once the brake event occurs.