Download Print this page

Holtek HT32 User Manual

Mcu touch key library
Hide thumbs Also See for HT32:

Advertisement

Quick Links

HT32 MCU Touch Key Library User's Guide
D/N: AN0608EN
Introduction
The HT32 touch key library developed by Best Solution is a library that integrates all of the touch
key underlying driver library files. The library has pre-configured the touch-related MCU hardware,
and provides intuitive and flexible touch key sensitivity settings, while integrating common
functions such as key detection and power-saving sleep modes.
Using the HT32 touch key library simplifies the use of the MCU touch functions, allowing users to
get started quickly and reducing the development period. This document will describe in detail the
environmental configuration and library usage.
Environmental Configuration
Obtain HT32 Touch Key Library
Contact Best Solution's FAE or refer to its website: http://www.bestsolution.com.tw/EN/
Or download the library from the Holtek website: https://www.holtek.com
Obtain HT32 Firmware Library
Refer to the following link to quickly obtain the Holtek HT32 firmware library:
https://www.holtek.com/productdetail/-/vg/HT32F54231_41_43_53
Open the link, select the Documents option as shown in Figure 1, where the red box 1 indicates the
location of the HT32 firmware library compressed files and the red box 2 indicates the location of
the touch key library download guide.
AN0608EN V1.10
HT32 MCU Touch Key Library User's Guide
Figure 1
1 / 12
December 2, 2022

Advertisement

loading
Need help?

Need help?

Do you have a question about the HT32 and is the answer not in the manual?

Questions and answers

Summary of Contents for Holtek HT32

  • Page 1 D/N: AN0608EN Introduction The HT32 touch key library developed by Best Solution is a library that integrates all of the touch key underlying driver library files. The library has pre-configured the touch-related MCU hardware, and provides intuitive and flexible touch key sensitivity settings, while integrating common functions such as key detection and power-saving sleep modes.
  • Page 2 1. The user’s PC needs to have the Keil development tool installed. 2. Unzip and open the HT32 firmware library. The files are listed as shown in Figure 2. Click on Holtek.HT32_DFP.latest to install it, after which the installation completion screen, as shown in Figure 3, will appear.
  • Page 3 HT32 MCU Touch Key Library User’s Guide 6. An interface, as shown in Figure 7, will appear. Input the number corresponding to the user’s IDE, after which a “*” sign will appear, as shown in Figure 8. Input “N” to go to next step.
  • Page 4 1. The user’s PC needs to have the IAR EWARM development tool installed. 2. After the IAR EWARM has been installed, it needs to install the HT32 support package for IAR. This support package includes the microcontroller data libraries, Flash programming algorithms, and all other files required for HT32 series microcontroller program development.
  • Page 5 HT32 MCU Touch Key Library User’s Guide 3. Unzip and open the Holtek HT32 Firmware Library, the files are listed as shown in Figure 16. Figure 16. HT32 Firmware Library File List 4. Unzip the touch key library which includes two folders, example and library, as shown below.
  • Page 6 HT32 MCU Touch Key Library User’s Guide 8. As shown in Figure 22, input “*” to create projects for all IC types or input the IC name to create a project for the selected IC. Figure 22 Figure 23 9. After finishing steps 1~8, as shown in Figure 24, select the desired IC project such as Project_54253.eww from the ..\example\TouchKey\TouchKey_LIB\EWARM\ path.
  • Page 7 Figure 26 Figure 27 After the HT32 touch key library project is opened by using the Keil tool, the main screen is shown as Figure 28. After the HT32 touch key library project is opened by using the IAR tool, the main screen is shown as Figure 29.
  • Page 8 HT32 MCU Touch Key Library User’s Guide Figure 30 Configuration Wizard Parameters It should be noted that there is no Configuration Wizard interface in the IAR tool, and the Configuration Wizard interface is unique to the KEIL MDK. 1. ht32_TouchKey_conf.h Configuration Wizard parameters:...
  • Page 9 HT32 MCU Touch Key Library User’s Guide Item Description Function Name TKL_GetKeyRef Input Parameter Key value (0 ~ max. key value) Return Value Reference value (0~65535) Description Used to obtain the reference value of the specified key Item Description Function Name...
  • Page 10 HT32 MCU Touch Key Library User’s Guide Item Description Function Name TKL_Is_Standby Input Parameter — Return Value 1 = allowed to enter sleep state; 0 = not allowed to enter sleep state Used to obtain the sleep state flag. Description *When a value of 0 is returned, then entering the sleep state may result in an unexpected state.
  • Page 11: Reference Material

    Figure 33 Conclusion This document has provided instructions for setting up the entire HT32 touch key development environment, assisting users to get started quickly. In addition, the resources used by the library, as well as various functions and parameters, have been explained in detail, allowing for an easier development process.
  • Page 12: Limitation Of Liability

    Information displayed at such sites. Hyperlinks to other websites are at your own risk. Limitation of Liability In no event shall Holtek Limited be liable to any other party for any loss or damage whatsoever or howsoever caused directly or indirectly in connection with your access to or use of this website, the content thereon or any goods, materials or services.