
GD32F403xx User Manual
272
selection. This means that the counter counts continuously in the interval between 0 and the
counter-reload value. Therefore, users must configure the TIMERx_CAR register before the
counter starts to count.
Table 16-3. Counting direction versus encoder signals
Counting mode
Level
CI0FE0
CI1FE1
Rising
Falling
Rising
Falling
CI0 only
counting
CI1FE1=High
Down
Up
-
-
CI1FE1=Low
Up
Down
-
-
CI1 only
counting
CI0FE0=High
-
-
Up
Down
CI0FE0=Low
-
-
Down
Up
CI0 and CI1
counting
CI1FE1=High
Down
Up
X
X
CI1FE1=Low
Up
Down
X
X
CI0FE0=High
X
X
Up
Down
CI0FE0=Low
X
X
Down
Up
Note:
"-" means "no counting"; "X" means impossible.
Figure 16-18. Example of counter operation in encoder interface mode
CI0
CI1
UP
down
Counter
Figure 16-19. Example of encoder interface mode with CI0FE0 polarity inverted
CI0
CI1
UP
down
Counter