AT32F425
Series Reference Manual
2022.03.30
Page 195
Ver 2.01
Table 14-4 Counting direction versus encoder signals
Active edge
Level on opposite signal
(C1INFP1 to C2IN, C2INFP2
to C1IN)
C1INFP1 signal
C2INFP2 signal
Rising
Falling
Rising
Falling
Count on C1IN only
High
Down
Up
No count
No count
Low
Up
Down
No count
No count
Count on C2IN only
High
No count
No count
Up
Down
Low
No count
No count
Down
Up
Count on both C1IN and
C2IN
High
Down
Up
Up
Down
Low
Up
Down
Down
Up
Figure 14-17
Example of counter behavior in encoder interface mode (encoder mode C)
20
21
22
23
24
25
26
27
26
25
24
23
22
21
20
1F
COUNTER
0x3
TWCMSEL
[1:0]
CI1RAW
CI2RAW
UP
DOWN
14.2.3.3 TMR input function
Each of timers (TMR2 and TMR3) has four independent channels, with each channel being configured
as input or output. As input, the channel can be used for the filtering, selection, division and input capture
of the input signals.
Figure 14-18
Input/output channel 1 main circuit
APB bus
MCU peripheral interface
Channel preload register
Channel shadow register
C1DT
Input
mode
IC1PS
C1EN
C1SWTR
TMR1_SWEVT
Capture
Counter
C1OBEN
C1OBEN
OVF
From tim e base unit
TMR1_CM1
Comparator
Input
mode
read_in_progress
capture_transfer
write_in_progress
capture_transfer
Output compare
mode
Capture/compare
seletion
C1DT
CVAL=C1DT
CVAL>CIDT
Capture/compare
seletion
Figure 14-19
Channel 1 input stage
C1IRAW
STCI
C1IFP1
C1IN
C1IPS
C1IF_rising
C1IF_falling
f
DTS
Filter
Downcounter
Edge detector
Polarity
selection
Capture/
compare
select
C2IFP1
divider