![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 303](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794303.webp)
GD32E23x User Manual
303
Figure 14-43. Timing chart of CAPWM
0
CHxVAL
CAR
PWM MODE0
Cx OUT
PWM MODE1
Cx OUT
Interrupt signal
CHxIF
CAM=2'b01 down only
CAM=2'b10 up only
CHxIF
CAM=2'b11 up/down
CHxIF
Channel output prepare signal
As is shown in
Figure 14-40. Channel output compare principle (x=0,1,2,3)
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,
setting to low by configuring the CHxCOMCTL field to 0x02 or toggling signal by configuring
the CHxCOMCTL field to 0x03 when the counter value matches the content of the
TIMERx_CHxCV register.
The PWM mode 0/PWM mode 1 output is another output type of OxCPRE which is setup by
configuring the CHxCOMCTL field to 0x06/0x07. In these modes, the OxCPRE signal level is
changed according to the counting direction and the relationship between the counter value
and the TIMERx_CHxCV content. Refer to the definition of relative bit for more details.
Another special function of the OxCPRE signal is a forced output which can be achieved by
configuring the CHxCOMCTL field to 0x04/0x05. The output can be forced to an
inactive/active level irrespective of the comparison condition between the values of the
counter and the TIMERx_CHxCV.