![GigaDevice Semiconductor GD32E23 Series User Manual Download Page 249](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794249.webp)
GD32E23x User Manual
249
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.
Configure the CHxCOMCEN bit to 1 in the TIMERx_CHCTL0 register, the OxCPRE signal
can be forced to 0 when the ETIFP signal derived from the external ETI pin is set to a high
level. The OxCPRE signal will not return to its active level until the next update event occurs.
Channel output complementary PWM
Function of complementary is for a pair of channels, CHx_O and CHx_ON, the two output
signals cannot be active at the same time. The TIMERx has 4 channels, but only the first
three channels have this function. The complementary signals CHx_O and CHx_ON are
controlled by a group of parameters: the CHxEN and CHxNEN bits in the TIMERx_CHCTL2
register, the POEN, ROS and IOS bits in the TIMERx_CCHP register, ISOx and ISOxN bits
in the TIMERx_CTL1 register. The output polarity is determined by CHxP and CHxNP bits in
the TIMERx_CHCTL2 register.
Table 14-2. Complementary outputs controlled by parameters
Complementary Parameters
Output Status
POEN ROS
IOS
CHxEN CHxNEN
CHx_O
CHx_ON
0
0/1
0
0
0
CHx_O / CHx_ON = LOW
CHx_O / CHx_ON output disable.
1
CHx_O = CHxP CHx_ON = CHxNP
CHx_O/CHx_ON output disable.
If clock is enable:
CHx_O = ISOx CHx_ON = ISOxN
1
0
1
1
0
0
CHx_O = CHxP CHx_ON = CHxNP
CHx_O/CHx_ON output disable.
1
CHx_O = CHxP CHx_ON = CHxNP
CHx_O/CHx_ON output enable.
If clock is enable:
1
0