AT32F425
Series Reference Manual
2022.03.30
Page 223
Ver 2.01
Upcounting mode
In upcounting mode, the counter counts from 0 to the value programmed in the TMR15_PR register,
restarts from 0, and generates a counter overflow event, with the OVFIF bit being set. If the overflow
event is disabled, the register is no longer reloaded with the preload and re-loaded value after counter
overflow occurs, otherwise, the prescaler and re-loaded value will be updated at an overflow event.
Figure 14-47
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-48
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
Repetition counter mode:
The repletion counter mode is enabled when the repetition counter value is not equal to 0. In this mode,
the repetition counter is decremented at each counter overflow. An overflow event is generated when
the repetition counter reaches 0. The frequency of the overflow event can be adjusted by setting the
repettion counter value.
Figure 14-49
OVFIF when RPR=2
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]
2
1
0
RPR[7:0]
OVFIF
14.4.3.3 TMR input function
TMR15 has two independent channels. 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.