www.ti.com
CapTIvate™ Touch Getting Started Manual
33
Copyright © 2021, Texas Instruments Incorporated
can be clicked on the corresponding parameter in the GUI and read "Affected Software Parameters" for
understanding.
Figure 5-15 Description of the correspondence between GUI and code parameters
Table 5-9 Composition table of software engineering
Number
Contents
Comment
1
CapTIvate™
Low-level driver library for capacitive touch-related peripherals, including
capacitance detection and communication configuration.
2
CapTIvate™_app
The top-level logic code of capacitive touch, including system initialization,
scanning and calibration logic.
3
CapTIvate™_config
Configuration parameters generated by the GUI.
4
driverlib
MSP430 peripheral driver library.
5
mathlib
Fixed-point calculation library.
6
targetConfigs
MCU model selection and programming configuration (no need to change).
7
lnk_msp430fRxxxx.cmd
Linker command file, which gives the settings of program space and data
space.
8
main.c
Main function
The program structure of the main function is shown in the right figure of Figure 5-14, and the function functions
involved in this part are shown in Table 5-10. For more function descriptions, please refer to API Guide
(
C:\ti\msp\CapTIvateDesignCenter_x.xx.xx.xx\CapTIvateDesignCenter\docs\api_guide
)
.
Table 5-10 Important functions
Number
Contents
Comment
1
WDTCTL = WDTPW | WDTHOLD
Ban watchdog.
2
BSP_configureMCU()
Configure the communication IO pin, configure the clock.
3
__bis_SR_register(GIE)
Enable global interrupt.
4
CAPT_appStart()
Capacitive touch module initialization and calibration, while
enabling communication peripherals.
5
CAPT_appHandler()
Capacitive touch scanning and mode switching.
6
__no_operation()
CPU waits for one cycle.
7
CAPT_appSleep()
CPU enters sleep, waiting for periodic interrupt to wake up.
8
CAPT_initUI()
Capacitive touch module initialization, and enable communication
peripherals.
9
CAPT_calibrateUI()
Capacitive touch module calibration.
10
CAPT_updateUI()
Update the parameters of all sensors.
11
I2CSlave_setRequestFlag()
Used to generate high-level pulses when touched to remind the host
computer of touch events.
5.5.2
Capacitive touch status and parameter reading and processing
As described in section 5.1.3, the Sensor structure is an abstraction of the actual sensor module. The Cycle
structure is hung under the Sensor structure, and the Element structure is hung under the Cycle structure. Users
can directly access the structure declared in captivate_config->CAPT_UserConfig.c to know the status of each
module, and can also modify the parameters in the structure in real time according to their needs. The most