cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube_FW_L4_V1.13.0 Touch Sensing Library multiple buttons in same group not working on STM32L476

WDe K.15
Associate

I tried to implement 7 touch buttons on a STM32L476, 3 on IO2,3 of group 1, 3 on IO 2,3 and 4 on group 2 and 1 on io2 of group 3. Samping caps are always on IO1 of the respective group.

As I wanted to process the buttons all at the same time, I created 1 bank. I then have the effect that all buttons on the same group seem to react on any touch of the 3. So i could only detect 3 out of 7 buttons really, 1 on each group.

I then created 7 banks, each with 1 button. And then it does work well.

So my first question is, as there was no example project with more than 1 button, has the software really been validated on the STM32L4? Because I think this is a bug.

I could combine 6 of the buttons in a rotary or linear touch sensor, but there was no such example for the STM32L4 in the STMCube firmware. Is this still to come? Should I look at other microcontroller families and copy from there?

1 REPLY 1
OlivierR
ST Employee

Regarding acquisition and group:

  • In your case (see picture bellow)
    • To get 7 sensors at the same time you need
      • 1 bank
      • 7 groups, mean 7 sampling capacitor
    • To get 7 sensors in 2 times you need
      • 2 banks
      • 4 groups, mean 4 sampling capacitor
    • To get 7 sensors in 3 times you need
      • 3 banks
      • 3 groups, mean 3 sampling capacitor

Regarding wheel or rotary

  • To get 6 channel information, you need to latch 6 channels at the same time
    • To get 6 sensors in 1 time you need
      • 1 bank
      • 6 group, mean 6 sampling capacitor

I will recommend to add an extra group dedicated to shield.

This picture shows TSC, group, bank, acquisition dependencies:

0690X000009YrcVQAS.png

You can get deeper information on AN5105.

Rgds