GD32W51x User Manual
466
Table 17-3. Counting direction versus encoder signals
Counting m ode
Level
CI0FE0
CI1FE1
Rising
Falling
Rising
Falling
CI0 only
counting
CI1FE1=High
Dow n
Up
-
-
CI1FE1=Low
Up
Dow n
-
-
CI1 only
counting
CI0FE0=High
-
-
Up
Dow n
CI0FE0=Low
-
-
Dow n
Up
CI0 and CI1
counting
CI1FE1=High
Dow n
Up
X
X
CI1FE1=Low
Up
Dow n
X
X
CI0FE0=High
X
X
Up
Dow n
CI0FE0=Low
X
X
Dow n
Up
Note:
"-" means "no counting"; "X" means impossible.
Figure 17-20. Example of counter operation in encoder interface mode
CI0
CI1
UP
down
Counter
Figure 17-21. Example of encoder interface mode with CI0FE0 polarity inverted
CI0
CI1
UP
down
Counter
Hall sensor function
Hall sensor is generally used to control BLDC Motor; advanced timer can support this function.