GD32F20x User Manual
438
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.
Slave controller
The TIMERx can be synchronized with a trigger in several modes including the Restart mode,
the Pause mode and the Event mode which is selected by the SMC [2:0] in the
TIMERx_SMCFG register. The trigger input of these modes can be selected by the TRGS
[2:0] in the TIMERx_SMCFG register.
Table 18-7. Slave controller examples
Mode Selection
Source Selection
Polarity Selection
Filter and Prescaler
LIST
SMC[2:0]
3'b100 (restart mode)
3'b101 (pause mode)
3'b110 (event mode)
TRGS[2:0]
000: ITI0
001: ITI1
010: ITI2
011: ITI3
100: CI0F_ED
101: CI0FE0
110: CI1FE1
111: ETIFP
If you choose the CI0FE0
or CI1FE1, configure the
CHxP and CHxNP for the
polarity selection and
inversion.
If you choose the ETIF,
configure the ETP for
polarity selection and
inversion.
For the ITIx no filter and
prescaler can be used.
For the CIx, configure
Filter by CHxCAPFLT,
no prescaler can be
used.
For the ETIF, configure
Filter by ETFC and
Prescaler by ETPSC.
Exam1
Restart mode
The counter can be
clear
and
restart
when a rising trigger
input.
TRGS
[2:0]=3’b00
0
ITI0 is the
selection.
-
For ITI0, no polarity
selector can be used.
-
For the ITI0, no filter
and prescaler can be
used.
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 ...