Getting started with touch sensing control on STM32 microcontrollers
Introduction
This document helps customers to quickly locate information regarding touch sensing on STM32 microcontrollers.
It is applicable to STM32F0, STM32F3, STM32L0, STM32L1 and STM32L4 Series products. It lists all the existing application
notes and user manuals covering touch sensing. It indicates where the key aspects of touch sensing are documented.
It also explains how to build touch sensing applications on STM32L0538-DISCO and STM32F072B-DISCO discovery boards
using the STM32CubeMx graphical interface.
AN5105 - Rev 1 - September 2018
For further information contact your local STMicroelectronics sales office.
www.st.com
Page 2
1General information
This document applies to Arm®-based devices.
Note:Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
AN5105
General information
AN5105 - Rev 1
page 2/52
Page 3
2Terminology and principle
2.1Terminology
The touch sensing most relevant acronyms are described below:
•Acquisition mode
–CT: Charge-Transfer acquisition principle. This mode is used on STM32 microcontrollers.
•Touch sensing STM32 peripheral
–TSC: touch sensing controller peripheral
–Bank: set of channels acquired simultaneously
–Channel: elementary acquisition item
–Group: set of 1..3 channels plus 1 sampling capacitor (Cs)
•Sensors
–Touchkey or TKey: single channel sensor
–Linear sensor: multi-channels sensor with the electrodes positioned in a linear way
–Rotary sensor: multi-channels sensor with the electrodes positioned in a circular way
–Active shield: track running along or copper plane surrounding the sensor track and/or sensor itself.
Active shield is driven similarly to the sensor. Improve noise robustness without decreasing the
sensitivity.
•STM32 software
–TSL: touch sensing library
–Delta: difference between the measure and the reference
–Measure or meas: current signal measured on a channel
–Reference or ref: reference signal based on the average of a sample of measures
–DTO: detection time out. Time out is defined by TSLPRM_DTO. See TSLPRM_DTO in tsl_conf.h file.
–DXS: detection exclusion system. Exclusion system is defined by TSLPRM_USE_DXS. See
TSLPRM_USE_DXS in tsl_conf.h file.
–ECS: environment change system. See TSLPRM_ECS_DELAY in tsl_conf.h file.
•Hardware Involved
–Cx: sensor capacitance (typical value is few pF)
–Cp: parasitic capacitance (typical value few pF)
–Ct: equivalent touch capacitance
–Cs/Cskey/Csshield: sampling capacitor (typical value from 2.2 to 100nF)
–Rs/Rskey/Rsshield: serial resistor, ESD protection (typical value from 100Ohms to 10K)
AN5105
Terminology and principle
2.2
AN5105 - Rev 1
Principle
The STM32 touch sensing feature is based on charge transfer.
The surface charge transfer acquisition principle consists in charging a sensor capacitance (Cx) and in
transferring the accumulated charge into a sampling capacitor (Cs).
This sequence is repeated until the voltage across Cs reaches VIH.
The number of charge transfers required to reach the threshold is a direct representation of the size of the
electrode capacitance. When the sensor is touched, the sensor capacitance to the earth is increased. This mean
the C voltage reaches VIH with less count and the measurement value decreases. When this measurement goes
below a threshold, a detection is reported by the TSL. The schematic below do not take into account the parasitic
capacitor.
page 3/52
Page 4
AN5105
Principle
Figure 1. Change transfer principle
V
DD
User finger
STM32
MCU
V
SS
Sampling
capacitor
Cs
Sensor capacitor
Cx
touchkey
sensor
eletrode
Human
body
coupling
to earth
Table 1. Change transfer principle documentation gives a list of documents containing information about the
change transfer principle.
Table 1. Change transfer principle documentation
Id
AN4299
AN4310
AN4312
AN4316Tuning a STMTouch-based applicationCharge transfer periode tuning
OLTSTM32L4 On Line TrainingTouch sensing controller (TSC)
Guidelines to improve conducted noise robustness on
STM32F0/F3/L0/L4 series touch sensing applications
Sampling capacitor selection guide for MCU based
touch sensing applications
Guidelines for designing touch sensing applications
with surface sensors
An online training is available under our website www.st.com.
Insert the STM32L4 Online Training” string in the "Search" fuction and press enter.
To find it use the function "Search" and insert the strings “STM32L4 Online Training”. Figure 4. STM32L4 Touch
Sensing Controller online training shows the online page available .
Figure 3. STM32L4 online training
AN5105
Figure 4. STM32L4 Touch Sensing Controller online training
AN5105 - Rev 1
page 6/52
Page 7
5Main characteristics
5.1Description
The following Figure 5. TSC characteristics shows all touch sensing controller (TSC) characteristics and their
correlation.
The TSC main characteristics are described in the following pages.
AN5105
Main characteristics
Figure 5. TSC characteristics
TSC
5.2
Signal
threshold
Charge
transfer
PCBSensorSensitivity
Guard ringShieldRotaryLinearKeys
Power
supply
False
detection
Noise
Noise
immunity
Conducted
Noise
Signal threshold
To tune the detection thresholds, it must determine the sensitivity of each touchkey. For each touchkey, can be
used few parameters to adjust these signal thresholds.
For debug purpose, it can get touchkey parameters using printf or STMStudio tool:
•The TSL api, tsl_user_SetThresholds, located in tsl_user.c allows to adjust each channel independently. See
below an example:
void tsl_user_SetThresholds(void)
{
/* USER CODE BEGIN Tsl_user_SetThresholds */
/* Example: Decrease the Detect thresholds for the TKEY 0*/
MyTKeys_Param[0].DetectInTh -= 10;
MyTKeys_Param[0].DetectOutTh -= 10;
/* USER CODE END Tsl_user_SetThresholds */
}
Table 3. Signal threshold usage documentation gives a list of documents containing information about the signal
threshold usage.
AN5105 - Rev 1
page 8/52
Page 9
IdTitleChapters
UM1913
AN4316Tuning a STMTouch-based application
Developing applications on STM32Cube with
STMTouch® touch sensing library
5.3Charge transfer
The acquisition is based on the measurement of the sensor channel capacitance.
To ensure that the Cx capacitance is correctly charged, it is necessary to monitor the pin connected to the sensor.
On sensors and shield sides, it must observe a complete Charge/Discharge cycle.
AN5105
Charge transfer
Table 3. Signal threshold usage documentation
Debug with STMStudio
Monitoring STMTouch driver variables using
STMStudio
Tuning of the Thresholds
Touchkeys thersholds
Linear and Rotary touch sensors thresholds
Figure 7. Incomplete and complete charge transfert cycle
In this example , to complete the charge transfer cycles, the following parameter must be modified as below:
•INCREASE:
–htsc.Init.PulseGeneratorPrescaler
–htsc.Init.CTPulseHighLength
–htsc.Init.CTPulseLowLength
•DECREASE:
–Sysclk
Table 4. Charge transfer documentation gives a list of documents containing information about the charge
transfer.
Table 4. Charge transfer documentation
Id
AN4299
AN4316Tuning a STMTouch-based applicationCharge transfer period tuning
Guidelines to improve conducted noise robustness on
STM32F0/F3/L0/L4 series touch sensing applications
TitleChapters
Active shield
AN5105 - Rev 1
page 9/52
Page 10
5.4Sensitivity
Sensitivity is a key point in touch sensing applications. The sensitivity can be improved by:
•Reduce air gap
•Reduce panel thickness
•Choose dielectric with higher ε
•GND plane must not too close from shield and sensors
•Avoid metallic paint near shield and sensors
Table 5. Sensitivity documentation gives a list of documents containing information about the sensitivity.
IdTitleChapter
AN1913
AN4312
AN4316Tuning a STMTouch-based applicationAll chapter
R
Table 5. Sensitivity documentation
Developing applications on STM32Cube with
STMTouch® touch sensing library
Guidelines for designing touch sensing applications
with surface sensors
AN5105
Sensitivity
GPIO mode (table)
Air Gap:
•Reduce air gap
Changing the Panel material:
•Reduce Panel thickness
•Choose dielectric with higher ε
Metal chassis:
•GND not too closed from Shield and Sensors
•Avoid Metallic paint near Shield and Sensors
Mechanical construction and PCB to panel bonding.
Surface sensor design
R
Dielectric example
Table 6. Dielectric constants of common materials used in a panel construction
Polyethylene terephthalate (PET)3.7
FR4 (fiberglass + epoxy4.2
PMMA (Poly methyl methacrylate)2.6 to 4
Material
Air1.00059
Glass4 to 10
Sapphire glass9 to 11
Mica4 to 8
Nylon3
Plexiglass3.4
Polyethylene2.2
Polystyrene2.56
Typical PSA2.0 - 3.0 (approximately)
ε
R
AN5105 - Rev 1
page 10/52
Page 11
5.5Sensors
•It is recommended to use the same shape for all electrodes.
•The touchkeys can be customized by the drawing on the panel. TSL compensates capacitance differences.
•Acquisition time and processing parameters can be optimized when electrodes have similar capacitance.
Sensor size example
5.5.1Key
•Key sensors are used in common application
•You can get deeper key information in following documents:
Table 7. Key documentation gives a list of documents containing information about the key.
AN5105
Sensors
Figure 8. Sensor size
Table 7. Key documentation
IdTitleChapters
UM1913
AN4312
Developing applications on STM32Cube with
STMTouch® touch sensing library
Guidelines for designing touch sensing applications
with surface sensors
Touchkey sensor
Touchkey sensor
AN5105 - Rev 1
page 11/52
Page 12
5.5.2Linear or slider
A linear is a set of contiguous capacitive electrodes. Figure 9. Interlaced linear touch sensor with 3 channels / 4
electrodes (half-ended electrodes design) shows a slider used on a discovery board.
Figure 9. Interlaced linear touch sensor with 3 channels / 4 electrodes (half-ended electrodes design)
AN5105
Sensors
Up to 60 mm
Full band width 3.6 mm
Tooth pitch
2.4 mm
Squared end
0.2~0.3 mm
Electrode/ground
gap 2 mm
Electrode gap 0.2~0.3 mm
Legend:
Via between layers
10% meshed ground plane
Copper electrode
Table 8. Linear touch sensor documentation gives a list of documents containing information about the linear
touch sensor.
Table 8. Linear touch sensor documentation
Id
UM1913
AN4312
Developing applications on STM32Cube with
STMTouch® touch sensing library
Guidelines for designing touch sensing
applications with surface sensors
TitleChapters
Linear and rotary touch sensors
Linear sensor
AN5105 - Rev 1
page 12/52
Page 13
5.5.3Rotary or wheel
A rotary is a set of contiguous capacitive electrodes.
Guidelines to improve conducted noise robustness
on STM32F0/F3/L0/L4 series touch sensing
applications
Guidelines for designing touch sensing
applications with surface sensors
TitleChapters
Active Shield
Driven shield
page 14/52
Page 15
5.6Layout and PCB
Rules to follow to improve TSC systems
5.6.1Led rules
AN5105
Layout and PCB
Figure 12. Led layout example
Figure 13. Example of cases where a LED bypass capacitor is required
V
DD
V
DD
V
DD
Table 11. Led rules documentation gives a list of documents containing information about led rules.
Table 11. Led rules documentation
Id
AN4312
Guidelines for designing touch sensing applications
with surface sensors
TitleChapters
•LEDs and Sensors.
•Placing of LEDs close to sensor
AN5105 - Rev 1
page 15/52
Page 16
5.6.2Electrode not located on PCB
It is possible but it is not recommended, because when the electrode it isn't located on PCB, the sensitivity
decreases and additional extra parasitic capacitances are added.
Figure 14. Electrode not located on PCB example
AN5105
Layout and PCB
Front panel
(plexiglass or
other suitable
material)
Controller
PCB
Spring
Printed
electrode
Printed
electrode
(optional)
PCB pad
Spacer (cylinder
of hard foam or
other suitable
material)
Flex PCB
ACF/ACP
connection
Flex
connector
Table 12. Electrode documentation gives a list of documents containing information about the electrode .
Table 12. Electrode documentation
Id
AN4312
Guidelines for designing touch sensing applications
TitleChapters
with surface sensors
Using electrodes separated from the PCB
AN5105 - Rev 1
page 16/52
Page 17
5.6.3Ground, shield and sensors
Table 13 gives a list of documents containing information about the layout .
IdTitleChapters
AN4312
Figure 15 shows the ground plane and the signal tracks.
Guidelines for designing touch sensing applications
with surface sensors
AN5105
Layout and PCB
Table 13. Layout documentation
•PCB and Layout
•Ground considerations
•Rotary and linear sensor recommendations
Figure 15. Hatched ground and signal tracks
Must be avoided
Track is OK
Figure 16. Ground plane example
Tkey2
Tkey3
Hatched ground plane (optional)
Tkey1
Tkey4
Rx
Rx
Rx
Rx
Flood ground plane (mandatory)
GPIO1
GPIO2
GPIO3
GPIO4
C
S
AN5105 - Rev 1
page 17/52
Page 18
Figure 17. Track routing
Figure 18. Track routing recommendation
At least 2 mm (4 - 5 mm is recommended)
AN5105
Layout and PCB
Ground plane or
ground track
Touchkey bank 1
At least
twice the
track width
As thin as
PCB
technology
allows
Any application track
(LED, power, Com.)
At least twice the
panel thickness
Touchkey bank 2
AN5105 - Rev 1
page 18/52
Page 19
(W)
Figure 19. Shield
Top layerBottom layer
Ground plane
Track width (W)
AN5105
Layout and PCB
~ 0.21
3-4 mm
Active shield
Sense plate
3 x W
AN5105 - Rev 1
page 19/52
Page 20
5.6.4FAQ
System keys points:
•Direct connection between earth and board ground is required to avoid conducted noise issues.
•Conductive painting on the front panel must be avoid.
•Robust mechanical assembly is required.
Layout keys points:
•GND plane is mandatory under MCU, sampling capacitors and up to serial resistors
•Hatched GND plane recommended for sensor traces from both sides of the PCB:
•Route the sensors and ground on the same layer while the components and other tracks are routed on the
Driven shield, or Active shield, is recommended.
•If there will be LEDs close to sensors, to indicate a touch event, they must be bypassed by a capacitor.
•External LDO regulator should be used to power the MCU only to provide a stable power supply voltage
•It is strongly recommended to dedicate pins to be used as touch sensors and do not share them with other
RS and CS keys points:
•PPS or NPO sampling capacitors are recommended. Possible X5R or X7R.
•Never use tantalium sampling capacitors.
•Serial ESD 10 K (down to 1 K) resistors are recommended to be placed as close as possible to the MCU
•No track crossing or via between these resistors and the MCU
•The value of sampling capacitor of active shield should be different than the value of the sampling capacitors
•The capacitance of active shield is higher (larger area) than CX of a single touch sensing channel. In order to
AN5105
Layout and PCB
–minimize parasitic capacitance
–mesh plane possible with 25% to 40% copper
other layers
typically 10 nF.
without any ripple, especially all the switching components like transistors, LEDs, in the application mustn't
be powered from the same voltage. This regulator should not be placed close to the sensors and their
tracks, but close to MCU.
features
used for acquisition.
achieve the same waveform on active shield and active touch sensing channel, the ratios CS/CX of active
shield and active touch sensing channel (touchkey). therefore, the CS of the active shield should also have
higher value (k x CS of touch sensing channel).
AN5105 - Rev 1
Sensor key points:
•Other traces must not cross the touch sensing traces or the whole touch sensing area
•The touch sensing traces should be as thin as technology allows and as short as possible.
–No longer than 10 cm
•The space between traces and GND plane should be ideally 5 mm
•TC pins are more robust against external interference than FT:
•Consider modification of PCB layout to allow connection of external VDD clamping diode to touch sensing
electrode traces.
–Use low‐capacitance diode like BAR18, BAS70 with Cmax = 2 pF.
–In case it is later needed, add pads and connection to the PCB without assembling components.
•Floating panes must never be placed close to the sensors.
page 20/52
Page 21
5.7Noise
Noise is a key point for touch sensing applications. Noise can come from Power supply.
5.7.1Power supply
Main rules to follow:
•Place Buzzer and LED before LDO.
•Place LDO close to MCU.
Supply
input
Figure 20. Typical power supply schematic
LEDs
V
DD
V
1 μF100 μF100 μF1 μF
IN
LDO
regulator
V
SS
V
OUT
(1)
AN5105
Noise
V
DD
V
DD
Touch sensing
device (MCU)
GPIO
V
SS
LED
10 nF
Table 14. Power supply documentation gives a list of documents containing information about the power supply.
Id
AN4312
Guidelines for designing touch sensing applications
with surface sensors
5.7.2False detection
To avoid false detection TSL embed ECS, DXS and DTO algorithms.
Table 15. False detection documentation gives a list of documents containing information about the false
detection.
IdTitleChapters
UM1913
Developing applications on STM32Cube with
STMTouch® touch sensing library
Table 14. Power supply documentation
TitleChapters
Power supply
Table 15. False detection documentation
•Environment Change System (ECS)
–Power supply voltage, temperature and
air humidity
•Detection Exclusion System (DXS)
•Detection Time Out (DTO)
AN5105 - Rev 1
page 21/52
Page 22
5.7.3Noise immunity
Noise filtering can be done on hardware and software (TSL) sides.
Table 16. Noise immunity documentation gives a list of documents containing information about the noise
Developing applications on STM32Cube with
STMTouch® touch sensing library
Guidelines to improve conducted noise robustness on
STM32F0/F3/L0/L4 series touch sensing applications
5.7.4Conducted noise
•Touch sensing systems requires the conducted noise immunity.
•A key point is the signal to noise ratio (SNR).
•The test condition to be followed by the user is described in the standard IEC61000-4-6.
Table 17. Conducted noise documentation gives a list of documents containing information about the conducted
noise.
AN5105
Noise
Table 16. Noise immunity documentation
Noise filters
How to improve noise immunity
AN4299
Table 17. Conducted noise documentation
IdTitleChapters
Guidelines to improve conducted noise robustness
on STM32F0/F3/L0/L4 series touch sensing
applications
All chapters
AN5105 - Rev 1
page 22/52
Page 23
6Tuning
For tuning purpose dedicated application note are available.
Sensors
Table 18. Sensors documentation gives a list of documents containing information about the sensor.
IdTitleChapters
AN4312
ESD
Table 19. ESD documentation gives a list of documents containing information about the ESD
Table 18. Sensors documentation
Guidelines for designing touch sensing applications
with surface sensors
AN5105
Tuning
All chapters
Table 19. ESD documentation
IdTitleChapters
AN3960ESD considerations for touch sensing applicationsAll chapters
CN
Table 20. Conducted noise documentation gives a list of documents containing information about the conducted
noise.
Table 20. Conducted noise documentation
Id
AN4299
Guidelines to improve conducted noise robustness on
STM32F0/F3/L0/L4 series touch sensing applications
TitleChapters
All chapters
CS
Table 21. Sampling capacitor documentation gives a list of documents containing information about the sampling
capacitor.
Table 21. Sampling capacitor documentation
AN5105 - Rev 1
Id
AN4310
TitleChapters
Sampling capacitor selection guide for MCU based
touch sensing applications
All chapters
page 23/52
Page 24
7Getting started TSC with STM32CubeMX
7.1Uses cases
How to set-up an TSC application based on TSL is esplained in the following two examples. These examples
describe the way to set-up TLS on STM32F072B-DISCO and STM32L0538-DISCO discovery boards.
This description can be used as example to set-up others TSC series such us L4, F3, L0, L1 and L4.
An STM32CubeMX new feature is available from version 4.24.0. This new feature can help to speed-up TSL,
TouchSensingLib, installation.
Figure 21. Main project panel
AN5105
AN5105 - Rev 1
page 24/52
Page 25
7.2Discovery board: STM32F072B-DISCO
The STM32F072 Discovery kit helps the user to discover the STM32F072, which has the full set of features
available in the STM32F0 Series, and to develop his applications easily. It includes everything required for
beginners and experienced users to get started quickly.
Based on the STM32F072RBT6, it includes an ST-LINK/V2 embedded debug tool interface, an ST MEMS
gyroscope, LEDs, push-buttons, linear touch sensor, RF EEPROM connector and a USB mini-B connector.
This discovery board provide a three channels linear (or slider) sensor. the main characteristics of these sensor
are:
•On-board ST-LINK/V2
•Supply through ST-Link USB
•External Supply: 3V and 5V
•JP2 (Idd) for current measurement
•Full-Speed USB with mini-B Connector
•Motion sensor, 3-axis digital output gyroscope (L3GD20)
•One Linear Touch Sensor or four Touch Keys
•Two Push-buttons: User and Reset
•Six LEDs: USB COM, 3.3 V Power, User (Orange/Green/Red/Blue)
•Extension header: (2 x 33) with 2.54 mm Pitch
•Discovery Board Formfactor
AN5105
Discovery board: STM32F072B-DISCO
7.2.1STM32F072B-DISCO board selection
Start to select STM32F072B-DISCO board.
Figure 22. STM32F072B-DISCO board selection
To start Linear Touch Sensor channel acquisition at the same time, three groups are used. (See
Figure 23. STM32F072B-DISCO board schematics
AN5105 - Rev 1
page 25/52
Page 26
Discovery board: STM32F072B-DISCO
Figure 23. STM32F072B-DISCO board schematics
AN5105
AN5105 - Rev 1
page 26/52
Page 27
7.2.2STM32F072B-DISCO TSC group and sensor activation
To activate the TSC group, sampling capacitors and sensor channels follows the below steps:
•activate TSC according schematics information.
•desactivate unrelevant peripheral like USB, SPI, NCF(L0), EPaper(L0), MFX(L0)
SWD peripheral must be set according to Figure 24
Figure 24. STM32F072B-DISCO pinout SWD
AN5105
Discovery board: STM32F072B-DISCO
TSC peripheral must be set according to Figure 25.
Figure 25. STM32F072B-DISCO pinout TSC
AN5105 - Rev 1
page 27/52
Page 28
Figure 26 shows the results obtained.
Figure 26. STM32F072B-DISCO pinout overview
AN5105
Discovery board: STM32F072B-DISCO
7.2.3STM32F072B-DISCO clock tree
It uses the default clock tree setting.
Figure 27. STM32F072B-DISCO clock configuration
AN5105 - Rev 1
page 28/52
Page 29
7.2.4STM32F072B-DISCO touchsensing library
To activate the TLS usage, switch on TOUCHSENSING box configuration.
Figure 28. TOUCHSENSING box configuration
AN5105
Discovery board: STM32F072B-DISCO
Select three channels Linear slider and assign dedicated Gx_IOy (see previous chapter or schematics for details).
•For training purpose, we can used three channels Linear slider as three keys sensors.
•Select three keys and assign dedicated Gx_IOy (see previous chapter or schematics for details).
Take care of ST-Link setup, see Figure 38. STM32F072B-DISCO setup.
page 34/52
Page 35
Figure 38. STM32F072B-DISCO setup
AN5105
Discovery board: STM32F072B-DISCO
Now the system is functional and ready to be used. Led will blink according finger position on slider.
AN5105 - Rev 1
page 35/52
Page 36
7.3Discovery board: STM32L0538-DISCO
The STM32L053 discovery kit helps you to discover the ultra-low-power microcontrollers of the STM32L0 series.
It offers everything required for beginners and experienced users to get started quickly and develop applications
easily.
Based on an STM32L053C8T6, it includes an ST-LINK/V2-1 embedded debug tool interface, linear touch sensor,
IDD current measurement, 2.04” E-paper display, NFC connector for PLUG-CR95HF-B board, LEDs, pushbuttons
and a USB Mini-B connector.
This discovery board provide a three channels linear (or slider) sensor. Their main characteristics are:
•On-board ST-LINK/V2-1
•Supply through ST-Link USB
•External Supply : 3V and 5V
•JP4 (Idd) for current measurement
•Full-Speed USB with mini-B Connector
•E-paper 2.04" display (172 x 72)
•One Linear Touch Sensor or four Touch Keys
•Two Push-buttons: User and Reset
•Four LEDs: USB COM, 3.3 V Power, user (Green/Red)
•Extension header: (2 x 25) with 2.54 mm Pitch
•Discovery Board Formfactor
AN5105
Discovery board: STM32L0538-DISCO
7.3.1STM32L0538-DISCO board selection
Start to select STM32L0538-DISCO board.
Figure 39. STM32L0538-DISCO board selection
To start linear touch sensor channel acquisition at the same time, three groups are used.
AN5105 - Rev 1
page 36/52
Page 37
Discovery board: STM32L0538-DISCO
Figure 40. STM32L0538-DISCO board schematics
AN5105
AN5105 - Rev 1
page 37/52
Page 38
7.3.2STM32L0538-DISCO TSC group and sensor activation
To activate the TSC group, sampling capacitors and sensor channels follows the below steps:
•Activate TSC according schematics information.
•You can deactivate unrelevant peripheral like USB, SPI, NCF(L0), EPaper(L0), MFX(L0)
SWD peripheral must be set according to Figure 41.
Figure 41. Pinout SWD
AN5105
Discovery board: STM32L0538-DISCO
TSC peripheral must be set according to Figure 42.
Figure 42. Pinout TSC
AN5105 - Rev 1
page 38/52
Page 39
Figure 43 shows the results obtained.
AN5105
Discovery board: STM32L0538-DISCO
Figure 43. Pinout overview
7.3.3STM32L0538-DISCO clock tree
It uses the default clock tree setting.
Figure 44. Clock configuration
AN5105 - Rev 1
page 39/52
Page 40
7.3.4STM32L0538-DISCO touchsensing library
To activate the TLS usage, switch on TOUCHSENSING box configuration.
Figure 45. TOUCHSENSING box configuration
AN5105
Discovery board: STM32L0538-DISCO
Select 3 channels Linear slider and assign dedicated Gx_IOy (see previous chapter or schematics for details).
For training purpose, the user can:
•use three channels linear slider as three keys sensors
•Select three keys and assign dedicated Gx_IOy (see previous chapter or schematics for tedails).
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST
products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST
products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of
Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.