cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S - Discovery - Touch Library Problem

loic
Associate II
Posted on June 03, 2013 at 15:44

Hello,

I am actually working on a project based on the Touch RC Acquisition.

I have downloaded the example from the ST website, but I didn't understand why the acquisition pin is wired on Timer 1 while according the STM8 Touch-Sensing Driver User Manual, this pin should be wired on a Timer 3 pin.

Thanks for your help,

Best regards,

Lo�c

#stm8-touch-library-rc-st #stm8-touch-library-rc-st
2 REPLIES 2
Thierry GUILHOT
ST Employee
Posted on June 03, 2013 at 21:45

Hi Loic,

The STM8S touch sensing library is not directly using the input capture of the timer. The number of input captures per timer being limited, a dedicated oversampling methodology (see AN2927) has been developed. Thanks to this approach any I/O of the STM8S device can be used. But you are right that to measure the time to charge or discharge the electrode capacitance, the touch sensing library is using either the Timer 2 or the Timer 3.

I hope that the reading of the AN2927 will help you to understand the RC acquisition principle and how it gets rid of the timer input capture.

Best Regards,

Thierry,

Hello,

I am actually working on a project based on the Touch RC Acquisition.

I have downloaded the example from the ST website, but I didn't understand why the acquisition pin is wired on Timer 1 while according the STM8 Touch-Sensing Driver User Manual, this pin should be wired on a Timer 3 pin.

Thanks for your help,

Best regards,

Loïc
loic
Associate II
Posted on July 02, 2013 at 16:10

Thank you Thierry,

However I have a new problem since some days, I have adapted the stm8_tsl_conf.h file to my application (one board with one RC capactive touch and a STM8L151 microcontrolleur) but the STM8 doesn't detect contact.

The electrode has a width of 9.25 mm because the insulator has a thickness of 2 mm.

I tried to modifie the thresholds, but no result.

I have also a question, in the 11th step of the stm8_tsl_conf.h file, the mask should coutain also the shield or only the key ?

I have the 2.4.0 version of the touch library and I use the Raisonance Compiler

Best Regards,

Loïc,