
Rev. 1.00
563 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
28 T
ouch Key
28 T
ouch Key
Touch Key Module n Control Register – TKMnCR
This register specifies the corresponding Module n function enable bit.
Offset:
0x100 × (n + 1) + 0x000
Reset value: 0x0000_0000
31
30
29
28
27
26
25
24
Reserved
Type/Reset
23
22
21
20
19
18
17
16
Reserved
Type/Reset
15
14
13
12
11
10
9
8
Reserved
MnTSS
Type/Reset
RW 0 RW 0
7
6
5
4
3
2
1
0
MnROEN MnKOEN MnDFEN Reserved MnSOFC
MnSOF
Type/Reset RW 0 RW 0 RW 0
RW 0 RW 0 RW 0 RW 0
Bits
Field
Descriptions
[9:8]
MnTSS
Touch Key Module n Time Slot Counter Clock Source Selection
00: Touch key module n reference oscillator
01: f
TKCLK
/ 32
10: f
TKCLK
/ 64
11: f
TKCLK
/ 128
The touch key function clock frequency is f
TKCLK
, the touch key function clock is set
by the TKCLKSEL bit.
[7]
MnROEN
Touch Key Module n Reference Oscillator Control
0: Disable
1: Enable
In the manual scan mode, this bit is used to enable/disable the touch key module
n reference oscillator. The MnROEN bit is set by software and is unaffected by the
TKST bit setting. If the module n reference oscillator is enabled, it will be disabled
automatically when the TKBUSY bit is changed from high to low.
In the auto scan mode or the periodic auto scan mode, this bit is controlled by
hardware automatically. For the module 0, when the TKST bit is from low to high,
the M0ROEN bit will be set high automatically. For the other module n (n ≠ 0), if
the condition that MnK4EN ~ MnK1EN ≠ b0000 and MnTSS = 0 is satisfied, the
MnROEN bit will be set high automatically when the TKST bit is from low to high. In
other conditions, the MnROEN bit will be unaffected by the TKST bit settings. When
the TKBUSY bit is changed from high to low, the MnROEN bit will automatically be
cleared to zero to disable the reference oscillator. For all modules, if the condition
that M0K4EN ~ M0K1EN = 0000B and MnK4EN ~ MnK1EN ≠ b0000 (n ≠ 0), the
M0ROEN bit needs to be manually set by software.