32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
Store C/F counter value to
the TKMn16D_Km bit filed
Note: Periodic scan Timer (PST)
Figure 203. Touch Key Periodic Auto Scan Mode Flowchart – TKMOD[1:0] = 10 ~ 11
Rev. 1.00
Start
Write Ref. OSC internal
Capacitor value to the
TKMn16D_Km bit filed
Touch Key Auto Scan Operation Start
Set Start bit TKST 0 → 1
→ Busy flag TKBUSY = 1
MCU Hold
(Optional)
Load Ref. OSC internal
Capacitor value from
the TKMnRO_Km bit filed
Initiate Time Slot &
16-bit C/F Counter
All Time Slot counter &
16-bit C/F counter
Start to count
For Time Slot
16-bit C/F counter
≤ threshold Value?
Yes
Last scan
in PST cycle?
No
All Time Slot
Counter overflow ?
No
All module
Change next key
scan finish
Last scan
in PST cycle?
No
Yes
Scan triger period
553 of 576
Yes
TKTH = 1
No
Touch key busy flag
TKBUSY = 0
Touch key scan end
No
Set TKST bit 1 → 0
(by software)
End
Yes
Yes
Yes
TKRCOV = 1
Touch key busy flag
TKBUSY = 0
No
Read C/F counter value
from the TKMn16D_Km bit
filed (by software)
Touch key scan end
Set TKST bit 1 → 0
(by software)
End
January 28, 2022
Need help?
Do you have a question about the HT32F54231 and is the answer not in the manual?