GD32A50x User Manual
339
show the principle circuit of channels output compare function.
Figure 18-14. Channel output compare principle (when MCHxMSEL = 2’00, x=0, 1, 2, 3)
Capture/
Compare register
CHxCV/MCHxCV
Counter
o
u
tp
u
t
com
p
a
ra
to
r
Compare output
control
CHxCOMCTL/
MCHxCOMCTL
Output enable and
polarity selector
CHxP,CHxEN/
MCHxFP,MCHxEN
OxCPRE/MOxCPRE
CNT>CHxCV/
MCHxCV
CNT=CHxCV/
MCHxCV
CNT<CHxCV/
MCHxCV
CHx_O
MCHx_O
Figure 18-15. Channel output compare principle (when MCHxMSEL = 2’01, x=0, 1, 2, 3)
Capture/
Compare register
CHxCV
Counter
o
u
tp
u
t
c
o
m
p
a
ra
to
r
Compare output
control
CHxCOMCTL
Output enable and
polarity selector
CHxP,CHxEN
OxCPRE
CNT>CHxCV
CNT=CHxCV
CNT<CHxCV
CHx_O
MCHx_O
Figure 18-16. Channel output compare principle (with complementary output when
MCHxMSEL = 2’11, x=0,1,2,3)
Capture/
compare register
CHxCV
Counter
o
u
tp
u
t
com
p
a
ra
to
r
Compare
output control
CHxCOMCTL
CNT>CHxCV
CNT=CHxCV
CNT<CHxCV
Output
complementary
protection
register
&Dead-Time
Output enable
and polarity
selector
CHxP,CHxEN/
MCHxP,MCHxEN
OxCPRE
CHx_O
MCHx_O
The relationship between the channel output signal CHx_O/MCHx_O and the OxCPRE/
MOxCPRE signal (more details refer to
) is described as
blew(the active level of OxCPRE is high and the active level of MOxCPRE is high).
When MCHxMSEL=2’b00 (in TIMERx_CTL2 register), the MCHx_O output is
independent from the CHx_O output. The output level of CHx_O depends on OxCPRE
signal, CHxP bit and CHxEN bit (please refer to the TIMERx_CHCTL2 register for more
details). The output level of MCHx_O depends on MOxCPRE signal, MCHxFP[1:0] bits
and MCHxEN bit (please refer to the TIMERx_MCHCTL2 for more details). Please refer
to
Figure 18-14. Channel output compare principle
When MCHxMSEL=2’b01, the MCHx_O output is the same as the CHx_O output. The