
GD32F20x User Manual
343
is setup by setting 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. With regard to a more detail description refer to the
relative bit definition.
Another special function of the OxCPRE signal is a forced output which can be achieved by
setting the CHxCOMCTL field to 0x04/0x05. Here the output can be forced to an
inactive/active level irrespective of the comparison condition between the counter and the
TIMERx_CHxCV values.
The OxCPRE signal can be forced to 0 when the ETIFE signal is derived from the external
ETI pin and when it is set to a high level by setting the CHxCOMCEN bit to 1 in the
TIMERx_CHCTL0 register. The OxCPRE signal will not return to its active level until the next
update event occurs.
Outputs complementary
Function of complementary is for a pair of CHx_O and CHx_ON. Those 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
and the POEN, ROS, IOS, ISOx and ISOxN bits in the TIMERx_CCHP and TIMERx_CTL1
registers. The outputs polarity is determined by CHxP and CHxNP bits in the
TIMERx_CHCTL2 register.
Table 18-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:
CHx_O = ISOx CHx_ON = ISOxN
1
0
1
1
0
0/1
0
0
CHx_O/CHx_ON = LOW
CHx_O/CHx_ON output disable.
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...