GD32A50x User Manual
431
TIMERx_CAR, the output will be always inactive in PWM mode 0
(CHxCOMCTL=3’b110).
And if the value of TIMERx_CHxCV is greater than the value of TIMERx_CAR, the output will
be always active in PWM mode 1 (CHxCOMCTL=3’b111).
Figure 18-53. EAPWM
timechart
0
CHxVAL
CAR
PWM MODE0
PWM MODE1
Cx OUT
Cx OUT
Interrupt signal
CHxIF
CHxOF
Figure 18-54. CAPWM
timechart
0
CHxVAL
CAR
PWM MODE0
Cx OUT
PWM MODE1
Cx OUT
Interrupt signal
CHxIF
CHxOF
CAM=2'b01 down only
CAM=2'b10 up only
CHxIF
CHxOF
CAM=2'b11 up/down
CHxIF
CHxOF
Channel output prepare signal
As is shown in
Figure 18-51. Channel output compare principle (x=0,1,2,3)
, when TIMERx
is configured in compare match output mode,a middle signal which is OxCPRE signal
(Channel x output prepare signal) will be generated before the channel outputs signal. The
OxCPRE signal type is defined by configuring the CHxCOMCTL bit. The OxCPRE signal has
several types of output function. These include keeping the original level by configuring the
CHxCOMCTL field to 0x00, setting to high by configuring the CHxCOMCTL field to 0x01,