Functional overview
STM32F042x4 STM32F042x6
20/117
DocID025832 Rev 5
3.10.3 V
BAT
battery voltage monitoring
This embedded hardware feature allows the application to measure the V
BAT
battery voltage
using the internal ADC channel ADC_IN18. As the V
BAT
voltage may be higher than V
DDA
,
and thus outside the ADC input range, the V
BAT
pin is internally connected to a bridge
divider by 2. As a consequence, the converted digital value is half the V
BAT
voltage.
3.11
Touch sensing controller (TSC)
The STM32F042x4/x6 devices provide a simple solution for adding capacitive sensing
functionality to any application. These devices offer up to 14 capacitive sensing channels
distributed over 5 analog I/O groups.
Capacitive sensing technology is able to detect the presence of a finger near a sensor which
is protected from direct touch by a dielectric (glass, plastic...). The capacitive variation
introduced by the finger (or any conductive object) is measured using a proven
implementation based on a surface charge transfer acquisition principle. It consists in
charging the sensor capacitance and then transferring a part of the accumulated charges
into a sampling capacitor until the voltage across this capacitor has reached a specific
threshold. To limit the CPU bandwidth usage, this acquisition is directly managed by the
hardware touch sensing controller and only requires few external components to operate.
For operation, one capacitive sensing GPIO in each group is connected to an external
capacitor and cannot be used as effective touch sensing channel.
The touch sensing controller is fully supported by the STMTouch touch sensing firmware
library, which is free to use and allows touch sensing functionality to be implemented reliably
in the end application.
Table 5. Capacitive sensing GPIOs available on STM32F042x4/x6 devices
Group
Capacitive sensing
signal name
Pin
name
Group
Capacitive sensing
signal name
Pin
name
1
TSC_G1_IO1
PA0
4
TSC_G4_IO1
PA9
TSC_G1_IO2
PA1
TSC_G4_IO2
PA10
TSC_G1_IO3
PA2
TSC_G4_IO3
PA11
TSC_G1_IO4
PA3
TSC_G4_IO4
PA12
2
TSC_G2_IO1
PA4
5
TSC_G5_IO1
PB3
TSC_G2_IO2
PA5
TSC_G5_IO2
PB4
TSC_G2_IO3
PA6
TSC_G5_IO3
PB6
TSC_G2_IO4
PA7
TSC_G5_IO4
PB7
3
TSC_G3_IO2
PB0
TSC_G3_IO3
PB1
TSC_G3_IO4
PB2