2020-02-15 06:53 AM
Hi. I'm working with the STM8TL52F4 MCU and its touch/proximity sensing peripheral. I made a simple touchkey sensor simulating Fig 3 AN4313 (ST App Note: Guidelines for designing touch sensing applications with projected sensors). If the sensor is touched, the STMTouch state machine (if repeatedly calling "TSL_user_Action()" and then testing "MyTKeys[(NB)].p_Data->StateId") reliably produces DETECT codes while a finger is firmly touching the sensor.
For short keypresses, it appears that the state machine DOES spit out contiguous blocks of DETECTs during finger contact with the sensor. Usually from the start, a series of CALIBRATEs, then some RELEASEs, a few DEB_DETECTs, the DETECTS, then more CALIBRATES, DEB_CALIBS and RELEASES after. Looks workable to me.
But if the keypress is longer than a second or so, along will always come intervening CALIBRATES, RELEASES, the whole family. And no more DETECTS will arrive, even as the key is still firmly pressed. And that's complicating the treatment of long keypresses, whose start and and stop times I need to initiate interrupts with. I wonder of there's some setting that might avoid those unwanted codes during long keypresses. If not, then any workaround? Thanks
2020-02-16 06:06 AM
updated
2020-02-17 07:50 AM
I'm afraid you posted this on the wrong thread. Although the FlightSense pushed by the VL53 sensors sounds a lot like TouchSense pushed by the STM8 guys and both use the word 'proximity', it really is a completely different technology.
The FlightSense sensors (VL6180, VL53L0, VL53L1 and the new VL53L3) all use a flash of Laser light to determine 'proximity' which can be up to a few meters.
The TouchSense is a capacitive system good to a few mm.
But to get an answer please post the question to the STM8 community.
2020-02-17 01:14 PM
Oops. Thanks.