GD32VF103 User Manual
243
before the counter starts to count.
Table 15-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 15-20. Example of counter operation in encoder interface mode
CI0
CI1
UP
down
Counter
Figure 15-21. Example of encoder interface mode with CI0FE0 polarity inverted
CI0
CI1
UP
down
Counter