With the HMI developing, touch sensing is more and more popular. The GPIO-based method was developed as a low-cost way to do touch sensing. NXP had developed this sensing method and provide as TSS library (which combines support for GPIO and hardware-based touch sensing).The GPIO method uses the RC charge time in a capacitor (the electrode or touch pad)
Measurement Principles: TSI Method
TSI method uses configurable current sources. The current sources are active outputs, making them far more robust against noise. Current sources are configurable, making it possible to configure sampling time. The signal slope depends on the applied current and the capacitance. When a finger approaches the electrode, frequency decreases.
Another oscillator, uses a internal unchanging capacitor, this is our reference, we will configure it to oscillate faster than the external one. By comparing how many reference oscillations where counted by the TSI module per external reference scan, we can know when a touch happened.