RM0091
27.3.7
Sampling capacitor I/O and channel I/O mode selection
To allow the GPIOs to be controlled by the touch sensing controller, the corresponding
alternate function must be enabled through the standard GPIO registers and the GPIOxAFR
registers.
The GPIOs modes controlled by the TSC are defined using the TSC_IOSCR and
TSC_IOCCR register.
When there is no on-going acquisition, all the I/Os controlled by the touch sensing controller
are in default state. While an acquisition is on-going, only unused I/Os (neither defined as
sampling capacitor I/O nor as channel I/O) are in default state. The IODEF bit in the
TSC_CR register defines the configuration of the I/Os which are in default state. The table
below summarizes the configuration of the I/O depending on its mode.
Table 97.
IODEF bit
(output push-pull
low)
(output push-pull
low)
(input floating)
(input floating)
Unused I/O mode
An unused I/O corresponds to a GPIO controlled by the TSC peripheral but not defined as
an electrode I/O nor as a sampling capacitor I/O.
Sampling capacitor I/O mode
To allow the control of the sampling capacitor I/O by the TSC peripheral, the corresponding
GPIO must be first set to alternate output open drain mode and then the corresponding
Gx_IOy bit in the TSC_IOSCR register must be set.
Only one sampling capacitor per analog I/O group must be enabled at a time.
Channel I/O mode
To allow the control of the channel I/O by the TSC peripheral, the corresponding GPIO must
be first set to alternate output push-pull mode and the corresponding Gx_IOy bit in the
TSC_IOCCR register must be set.
For proximity detection where a higher equivalent electrode surface is required or to speed-
up the acquisition process, it is possible to enable and simultaneously acquire several
channels belonging to the same analog I/O group.
Note:
During the acquisition phase and even if the TSC peripheral alternate function is not
enabled, as soon as the TSC_IOSCR or TSC_IOCCR bit is set, the corresponding GPIO
analog switch is automatically controlled by the touch sensing controller.
I/O state depending on its mode and IODEF bit value
Acquisition
status
0
No
0
On-going
1
No
1
On-going
Doc ID 018940 Rev 1
Touch sensing controller (TSC)
Unused I/O
Electrode I/O
mode
Output push-pull
Output push-pull
low
Output push-pull
low
Input floating
Input floating
Input floating
Sampling
capacitor I/O
mode
mode
Output push-pull
low
low
-
-
Input floating
-
-
687/742
Need help?
Do you have a question about the STM32F05 series and is the answer not in the manual?
Questions and answers