
AT32F413
Series Reference Manual
2022.06.27
Page 209
Rev 2.00
overflow event, otherwise, the counter is updated with the preload value and period value on an overflow
event.
Figure 14-33
Overflow event when PRBEN=0
0
1
2
3
...
31
32
0
1
2
3
...
31
32
0
1
2
3
COUNTER
31
32
0
1
32
...
PR[15:0]
OVFIF
TMR_CLK
0
DIV[15:0]
22
Clear
Clear
Clear
Figure 14-34
Overflow event when PRBEN=1
0
1
2
3
...
21
22
0
1
2
3
...
31
32
0
1
2
3
COUNTER
31
32
0
1
32
...
PR[15:0]
OVFIF
TMR_CLK
0
DIV[15:0]
22
Clear
Clear
Clear
14.2.3.3 TMR input function
TMR9 timer has two independent channels, while each of TMR10 and TMR11 has an independent
channel. Each channel can be 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-35
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-36
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
Input mode
In input mode, the TMRx_CxDT registers latch the current counter values after the selected triggle signal
is detected, and the capture compare interrupt flag bit (CxIF) is set. An interrupt will be generated if the
CxIEN bit is enabled. If the selected trigger signal is detected when the CxIF is set, the CxRF is set.