![ARTERY AT32F435 Series Скачать руководство пользователя страница 306](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592306.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 306
Rev 2.03
Figure 14-71
Counter timing diagram with internal clock divided by 1 and TMRx_PR=0x32
0
1
2
3
...
31
32
31
30
2F
2E
...
2
1
0
1
2
3
COUNTER
31
32
31
30
...
PR[15:0]
OVFIF
TMR_CLK
0
DIV[15:0]
32
Clear
Clear
Clear
11
TWCMSEL
[1
:
0]
Repetition counter mode
The TMRx_RPR register is used to set the counting period of repetition counter. The repetition 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 (RPR[15:0]+1). An overflow event is generated when the
repetition counter reaches 0. The frequency of the overflow event can be adjusted by setting the
repetition counter value.
Figure 14-72
OVFIF in upcounting mode and up/down counting mode
0
1
2
3
...
31
32
0
1
2
3
...
31
32
0
1
2
3
COUNTER
31
32
0
1
2
...
RPR[7:0]
2
1
0
RPR_CNT
overflow
OVFIF
2
0
1
2
3
...
31
32
31
30
2F
...
1
0
1
2
3
COUNTER
31
32
31
2F
2
...
RPR[7:0]
2
1
0
RPR_CNT
overflow
OVFIF
2
30
...
1
0
1
2
3
...
31
32
31
30
2F
...
1
0
1
2
3
COUNTER
31
32
31
2F
1
...
RPR[7:0]
1
0
1
RPR_CNT
overflow
OVFIF
0
30
...
1
0
1
2
3
...
31
32
31
30
2F
...
1
0
1
2
3
COUNTER
31
32
31
2F
0
...
RPR[7:0]
0
RPR_CNT
overflow
OVFIF
30
...
1
clear
clear
clear
clear
clear
clear
Example 1
:
up count mode,RPR=0x2
Example 2
:
two-way up count mode3, RPR=0x2
Example 3
:
two-way up count mode3, RPR=0x1
Example 4
:
two-way up count mode3, RPR=0x0