
Rev. 1.00
548 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
28 T
ouch Key
Manual 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. In the Manual mode, at the end of the
fixed reference clock time interval a Touch key interrupt signal will be generated. The Timing of
touch sensor oscillation and reference oscillation is as follow:
TKST
MnKOEN
MnROEN
KEY OSC CLK
Reference OSC CLK
f
CFTMCK
Enable
f
CFTMCK
(MnDFEN=0)
f
CFTMCK
(MnDFEN=1)
TKBUSY
TKRCOV
Clear to zero
by hardware
Set Touch Key TKRCOV
interrupt request flag
8-bit time slot counter overflow time
Figure 199. Touch Key Manual Scan Mode Timing Diagram
All modules use the same started signal, TKST, in the TKCR register. The touch key module
16-bit C/F counter, touch key function 16-bit counter, 5-bit time slot unit period counter in
all modules will be automatically cleared when the TKST bit is cleared to zero, but the 8-bit
programmable time slot counter will not be cleared. The overflow time is set by users. When the
TKST bit changes from low to high, the 16-bit C/F counter, touch key function 16-bit counter, 5-bit
time slot unit period counter and 8-bit time slot timer counter will be automatically switched on.
The key oscillator and reference oscillator in all modules will be automatically stopped and the
16-bit C/F counter, touch key function 16-bit counter, 5-bit time slot unit period counter and 8-bit
time slot timer counter will be automatically switched off when the time slot counter overflows.
The clock source for the time slot counter is sourced from the module n reference oscillator or the
touch key function clock frequency, f
TKCLK
, divided by 32, 64 or 128, which is selected using the
MnTSS bit in the TKMnCR register. The reference oscillator and key oscillator will be enabled by
setting the MnROEN bit and MnKOEN bits in the TKMnCR register.