cancel
Showing results for 
Search instead for 
Did you mean: 

TSC Channel selection

avinash_elec
Associate III

Hello Everyone!

I have thoroughly understood touch sense controller peripheral of STM32F051C8T6, I have also developed a test code using the HAL layer and is working file and detecting touch (i.e. is count value decreasing when finger comes near electrode). I have also read the TSC section of reference manual several times. I am unable to understand how to change the channel of acquisition within a group.

Right now what is happening is that I have enabled all three pins of IO group 2 as input electrode and the final (4th) one has the SAMPLING CAPACITOR connect to it. But the aquisition process always aquire the first channel only.

I am NOT able to find any function in HAL lib to change channel NOR I am able to find any register that controls that.

Some where it is written that acquisition within a group is sequential, but it is NOT also happening, each time only channel 1 is acquired.

1 ACCEPTED SOLUTION

Accepted Solutions
OlivierR
ST Employee

Hello Avinash,

Find 2 examples based on G4 TSC group acquisition.

  • Sampling capacitance is on G4_IO1
  • 3 channels are located on G4_IO2, G4_IO3, G4_IO4.

1st example is based on HAL TSC.

2nd example is based on TSL (TouchSensingLibrary)

Regards. Olivier

View solution in original post

3 REPLIES 3
OlivierR
ST Employee

Hello Avinash,

Find 2 examples based on G4 TSC group acquisition.

  • Sampling capacitance is on G4_IO1
  • 3 channels are located on G4_IO2, G4_IO3, G4_IO4.

1st example is based on HAL TSC.

2nd example is based on TSL (TouchSensingLibrary)

Regards. Olivier

avinash_elec
Associate III

Thank you all for your kind suggestions. I have finally figured it out! And my touch sensing app working great ! I will post details here if anyone else reading have the same doubts, then this would be beneficial to them.