cancel
Showing results for 
Search instead for 
Did you mean: 

TSL on STM32l Discovery

analox
Associate
Posted on March 02, 2012 at 07:58

GDay to all

1) what is the minimum frequency for calls to TSL_Action() to keep the TSL responsive? the spec only says ''periodically''. Is every 100 ms enough ?

2) what CPU-usage can we expect (at 32MHz) for the TSL for 8 Buttons?

thank you in advance !
3 REPLIES 3
Thierry GUILHOT
ST Employee
Posted on March 04, 2012 at 17:00

Hello,

Please find below some information on your questions:

1/ A response time is considered as good when it is lower than 90ms. Above this limit, the end user of the touch sensing application will start feeling the delay between the ?touch? and the action (LED turn on for instance). Taking into account this information and the STM32 touch sensing library operation, calling the TSL_Action() function every 100ms is not enough.

Each call to the TSL_Action() function forces TSL main state machine to jump to the next state. As shown below, the main state machine is composed of several states: SCKey P1 acquisition, SCKey P1 processing, ?

0690X000006057GQAQ.png

As it seems that you need to manage 8 touchkeys, both P1 and P2 banks will be required. This means that the complete process will require a minimum of 5 TSL_Action() calls (no debounce considered). To ensure safe system operation a debounce of minimum 1 should be specified. I would thus suggest you to call the TSL_Action at least every 10ms.

2/ It is difficult to answer to this question as the acquisition time depends on the sampling capacitor value used and on the response time you want to achieve.

Let?s say that the acquisition time of a bank (P1 or P2) is 10ms. The total post-processing time (SCKey P1, SCKey P2 and ECS) will be less than 2ms. If we consider a debounce of 1, then the total process time will be around 45ms with a CPU load at 100% during this period.

Best Regards,

Thierry,

GDay to all

1) what is the minimum frequency for calls to TSL_Action() to keep the TSL responsive? the spec only says ''periodically''. Is every 100 ms enough ?

2) what CPU-usage can we expect (at 32MHz) for the TSL for 8 Buttons?

thank you in advance !
analox
Associate
Posted on March 05, 2012 at 10:44

Thank you Thiery,

so if you state 45 ms to be  the time to process two banks and we want to achieve 90 ms reaction time, can I assume (roughly spoken) we are at about 50% CPU load ?

thank you !
Thierry GUILHOT
ST Employee
Posted on April 25, 2012 at 21:26

Hello,

Your statement is correct.

Best Regards,

Thierry,