
Rev. 1.00
249 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
14 General-Purpose T
imer (GPTM)
14 General-Purpose T
imer (GPTM)
Register Descriptions
Timer Counter Configuration Register – CNTCFR
This register specifies the GPTM counter configuration.
Offset:
0x000
Reset value: 0x0000_0000
31
30
29
28
27
26
25
24
Reserved
DIR
Type/Reset
RW 0
23
22
21
20
19
18
17
16
Reserved
CMSEL
Type/Reset
RW 0 RW 0
15
14
13
12
11
10
9
8
Reserved
CKDIV
Type/Reset
RW 0 RW 0
7
6
5
4
3
2
1
0
Reserved
UGDIS
UEVDIS
Type/Reset
RW 0 RW 0
Bits
Field
Descriptions
[24]
DIR
Counting Direction
0: Count-up
1: Count-down
Note: This bit is read only when the Timer is configured to be in the Center-aligned
mode or when used as a Quadrature decoder.
[17:16]
CMSEL
Counter Mode Selection
00: Edge-aligned mode. Normal up-counting and down-counting available for this
mode. Counting direction is defined by the DIR bit.
01: Center-aligned mode 1. The counter counts up and down alternatively. The
compare match interrupt flag is set during the count-down period.
10: Center-aligned mode 2. The counter counts up and down alternatively. The
compare match interrupt flag is set during the count-up period.
11: Center-aligned mode 3. The counter counts up and down alternatively. The
compare match interrupt flag is set during the count-up and count-down
periods.
[9:8]
CKDIV
Clock Division
These two bits define the frequency ratio between the timer clock (f
CLKIN
) and the
dead-time clock (f
DTS
). The dead-time clock is also used for digital filter sampling
clock.
00: f
DTS
= f
CLKIN
01: f
DTS
= f
CLKIN
/ 2
10: f
DTS
= f
CLKIN
/ 4
11: Reserved