cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 TSC Analog Switch

Diego Ballen
Associate II
Posted on November 17, 2017 at 17:36

Hello everyone,

I was researching about the TSC (Touch Sensing Controller) of my Board Nucleo L053R8 and I found that there it has  something called 'the analog switch'.

The TSC is composed of several groups. Each group is composed of 4 I/Os being one of them dedicated for one  reference capacitor (Cs) while the other 3 are dedicated for connecting capacitive buttons. What I suspect is that one analog switch belong to one group, and it can be used to connect internally the I/Os of a group.

Does anyone have experience with this topic? any code example? Mi goal is to connect internally and programatically two I/Os for certain time and after separate them.

Thank you all. Any help is highly appreciated.

Best regards,

Diego Ballen

#stm32-l0 #analog-switch #tsc
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on November 20, 2017 at 18:26

I agree that RM could be clearer in this respect, but do you expect it to be anything more than a single write to the analog switch register (TSC_IOASCR)?

JW

View solution in original post

4 REPLIES 4
Imen.D
ST Employee
Posted on November 20, 2017 at 11:40

Hello

diego_ballen

,

I recommended you to start from the TouchSensing application under the STM32CubeL0 firmware package:

STM32Cube_FW_L0_V1.0\Projects\STM32L053C8-Discovery\Applications\TouchSensing

You may find clarification and more details on how to use the TSC referring to the UM1913: 'Developing applications on STM32Cube with touch sensing' and

http://www.st.com/content/ccc/resource/training/technical/product_training/6b/ea/47/06/18/83/43/67/STM32L4_Peripheral_Touchsense.pdf/files/STM32L4_Peripheral_Touchsense.pdf/jcr:content/translations/en.STM32L4_Peripheral_Touchsense.pdf

Hope this bring you some help.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on November 20, 2017 at 18:12

Hello Imen D,

thank you very much for your answer. I was checking the example, but I could not found any part of the code in which some kind of internal switch was activated to join two I/Os and charge the Cs with the Cx. Basically what is done here is to initialize the TSC, start the acquisition by writing a register and then wait until Cs achieves certain voltage. When this happens the conversion is finished.

I could not find any code to control the analog switch to temporaly join two I/Os.

Thank you again for your help.

Best regards,

Diego Ballen

Posted on November 20, 2017 at 18:26

I agree that RM could be clearer in this respect, but do you expect it to be anything more than a single write to the analog switch register (TSC_IOASCR)?

JW

Posted on November 21, 2017 at 10:59

Hello Wacklawek.jan,

thank you very much for your suggestion. I just activate the analog switch for the two pins I wanted to join by writing the TSC_IOASCR register and that made the trick.

Again thanks for your help!

Diego Ballen