
GD32A50x User Manual
447
00: Channel 1 is programmed as output.
01: Channel 1 is programmed as input, IS1 is connected to CI1FE1.
10: Channel 1 is programmed as input, IS1 is connected to CI0FE1.
11: Channel 1 is programmed as input, IS1 is connected to ITS. This mode is
working only if an internal trigger input is selected (through TRGS bits in
TIMERx_SMCFG register).
7
CH0COMCEN
Channel 0 output compare clear enable.
When this bit is set, if the ETIFP signal is detected as high level, the O0CPRE signal
will be cleared.
0: Channel 0 output compare clear disabled
1: Channel 0 output compare clear enabled
6:4
CH0COMCTL[2:0]
Channel 0 compare output control
This bit-field controls the behavior of O0CPRE which drives CH0_O. O0CPRE is
active high, while CH0_O active level depends on CH0P bits.
000: Timing mode. The O0CPRE signal keeps stable, independent of the
comparison between the register TIMERx_CH0CV and the counter TIMERx_CNT.
001: Set the channel output on match. O0CPRE signal is forced high when the
counter is equals to the output compare register TIMERx_CH0CV.
010: Clear the channel output on match. O0CPRE signal is forced low when the
counter is equals to the output compare register TIMERx_CH0CV.
011: Toggle on match. O0CPRE toggles when the counter is equals to the output
compare register TIMERx_CH0CV.
100: Force low. O0CPRE is forced to low level.
101: Force high. O0CPRE is forced to high level.
110: PWM mode 0. When counting up, O0CPRE is active when the counter is
smaller than TIMERx_CH0CV, otherwise it is inactive. When counting down,
O0CPRE is inactive when the counter is larger than TIMERx_CH0CV, otherwise it
is active.
111: PWM mode 1. When counting up, O0CPRE is inactive when the counter is
smaller than TIMERx_CH0CV, otherwise it is active. When counting down,
O0CPRE is active when the counter is larger than TIMERx_CH0CV, otherwise it is
inactive.
If configured in PWM mode, the O0CPRE level changes only when the output
compare mode is adjusted from
“Timing” mode to “PWM” mode or the comparison
result changes.
3
CH0COMSEN
Channel 0 compare output shadow enable
When this bit is set, the shadow register of TIMERx_CH0CV register, which updates
at each update event, will be enabled.
0: Channel 0 output compare shadow disabled
1: Channel 0 output compare shadow enabled
The PWM mode can be used without verifying the shadow register only in single
pulse mode (when SPM=1).