cancel
Showing results for 
Search instead for 
Did you mean: 

How to reliably determine (long touch) DETECT events with the STM8TL5x TouchSense / ProxSense state machine.

Ted Jackson
Senior

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

3 REPLIES 3
Ted Jackson
Senior

updated

John E KVAM
ST Employee

​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.

  • john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

Oops. Thanks.