2017-11-17 08:36 AM
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 #tscSolved! Go to Solution.
2017-11-20 10:26 AM
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
2017-11-20 02:40 AM
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\TouchSensingYou may find clarification and more details on how to use the TSC referring to the UM1913: 'Developing applications on STM32Cube with touch sensing' and
Hope this bring you some help.
Best Regards
Imen
2017-11-20 10:12 AM
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
2017-11-20 10:26 AM
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
2017-11-21 02:59 AM
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