
Rev. 1.00
557 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
28 T
ouch Key
28 T
ouch Key
Bits
Field
Descriptions
[2:1]
TKMOD
Touch Key Scan Mode Selection
00: Auto scan mode
01: Manual mode (default)
10: Periodic auto scan mode
11: Periodic auto scan mode
In the manual scan mode, the reference oscillator capacitor value should be properly
configured before the scan operation begins and the touch key module 16-bit C/F
counter value should be read by application program after the scan operation finishes.
The individual reference oscillator capacitor value and 16-bit C/F counter content
for all the scanned keys will be are read and written from the TKMnKmCPR and
TKMnKmCNTR registers respectively. In the auto scan mode, the keys to be
scanned can be arranged in a specific sequence which is determined by the
MnSK3[1:0] ~ MnSK0[1:0] bits in the TKMnKCFGR register. The scan operation will
not be stopped until all arranged keys are scanned.
In the periodic auto scan mode, the touch key scan operation will be implemented
automatically on a periodic basis, which can be determined by the ASMP1 ~ ASMP0
bits in the TKCR register. Only at the end of the last scan operation in the Periodic
auto scan mode time-out cycle, T
ASMTO
, the 16-bit C/F counter content for all scanned
keys will be written into the corresponding TKMnKCFGR. In addition, when any key
C/F counter value is less than the lower threshold if MnKmTHS = 0, or larger than
the upper threshold if MnKmTHS = 1, the TKTH signal will be set high. The other
actions in this mode are the same as those in the auto scan mode except the above
mentioned.
[0]
TKST
Touch Key Detection Start Control
0: Stopped or no operation
0→1: Start detection
In all modules the16-bit C/F counter, 16-bit C/F counter, touch key function 16-
bit counter and 5-bit time slot counter will be automatically cleared when this bit
is cleared to zero. However, the 8-bit programmable time slot counter will not be
cleared. When this bit is changed from low to high, the touch key module 16-bit
C/F counter, touch key function 16-bit counter, 5-bit time slot unit period counter
and 8-bit time slot counter will be switched on together with the key and reference
oscillators to drive the corresponding counters.