GD32F20x User Manual
405
center-aligned and channel is configured in output mode (CHxMS=00 in
TIMERx_CHCTL0 register). Only when the counter is counting up, compare
interrupt flag of channels can be set.
11: Center-aligned and counting up/down assert mode. The counter counts under
center-aligned and channel is configured in output mode (CHxMS=00 in
TIMERx_CHCTL0 register). Both when the counter is counting up and counting
down, compare interrupt flag of channels can be set.
After the counter is enabled, CAM[1:0] cannot be switched from 0x00 to non 0x00.
4
DIR
Direction
0: Count up
1: Count down
This bit is read only when the timer is configured in Center-aligned mode or
Encoder mode.
3
SPM
Single pulse mode.
0: Counter continues after update event.
1: The CEN is cleared by hardware and the counter stops at next update event.
2
UPS
Update source
This bit is used to select the update event sources by software.
0: When enabled, any of the following events generate an update interrupt or DMA
request:
–
The UPG bit is set
–
The counter generates an overflow or underflow event
–
The slave mode controller generates an update event.
1: When enabled, only counter overflow/underflow generates an update interrupt
or DMA request.
1
UPDIS
Update disable.
This bit is used to enable or disable the update event generation.
0: update event enable. The update event is generate and the buffered registers
are loaded with their preloaded values when one of the following events occurs:
–
The UPG bit is set
–
The counter generates an overflow or underflow event
–
The slave mode controller generates an update event.
1: update event disable. The buffered registers keep their value, while the counter
and the prescaler are reinitialized if the UG bit is set or if the slave mode controller
generates a hardware reset event.
0
CEN
Counter enable
0: Counter disable
1: Counter enable
The CEN bit must be set by software when timer works in external clock, pause
mode and encoder mode. While in event mode, the hardware can set the CEN bit
automatically.
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 ...