cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up a STM32 touch sense project with CubeMX

dieter 123
Associate III
Posted on January 30, 2017 at 12:21

Hi

I am trying to setup a new touch sense project and have  question:

I configured certain pins as TSC, how do I add the the middleware TSC LIb in CubeMx now? For my Nucleoboard L053R8 CubeMX under middlewares doesnt show TSC but only: USB_device/FREERTOS/FATFS.

Thx

#tsc #tm32-cubemx
5 REPLIES 5
Imen.D
ST Employee
Posted on January 30, 2017 at 13:39

Hi

The TouchSensing is not supported by CubeMx in the code generation, only the pinout is configured for Touch Sensing peripheral.

Adding support TS in CubeMx generated code is already requested internally and under investigation.

So, you have to add the touch sensing library manually and define correctly the paths of all required files. 

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries-expansions/32f0-touch-lib.html

firmware library is available on ST web either as standalone packages or directly integrated into the STM32CubeL0 firmware 

under STM32Cube_FW_L0_V1.8.0\Middlewares\ST\STM32_TouchSensing_Library.

You can get inspired from the TouchSensing application under the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubel0.html

package, this may help you to develop your project: STM32Cube_FW_L0_V1.8.0\Projects\STM32L053C8-Discovery\Applications\TouchSensing

Please note that you may find more details on how to use the TSL

referring to 

this user manual

http://www.st.com/content/ccc/resource/technical/document/user_manual/group0/d6/4c/20/0d/a1/c1/4c/99/DM00210526/files/DM00210526.pdf/jcr:content/translations/en.DM00210526.pdf

'.

Also, several TSC related resources are available on the ST web site. Ex: AN3236, AN3960, AN4310, AN4312, AN4299...

Hope this helps you.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
gates.nathan
Associate III
Posted on December 17, 2017 at 17:26

Hi ​

Did you ever managed to manually include this TSL middleware in a cubemx generate project?

Thanks

Posted on December 18, 2017 at 11:25

yes , I managed and it is working fine!

Posted on December 18, 2017 at 11:52

Thats great to hear! I've been struggling to manually include it in my stm32f042 project.

Could you please explain to me how you included it? 

Much Appreciated

dieter 123
Associate III
Posted on December 18, 2017 at 13:11

Hi

I just generated a project with cube. Then manualy copied this to my project directory

STM32Cube_FW_L0_V1.8.0\Middlewares\ST\STM32_TouchSensing_Library

I am using IAR, so I added the files in IAR .

Then from the firmware of this

http://www.st.com/en/evaluation-tools/32l0538discovery.html

 

i copied the TSC user files. to my project directory and then added them to IAR. Adapted the my project needs. Compile ->worked.

For better warm up I ordered one of these boards: it is a nice playground as it comes with a wheel/slider/buttons

http://www2.ineltek.com/shop/product_info.php?info=p757_Atmel-QT1-Xplained-Pro.html&XTCsid=ejkmk0jtvujrlurg1dsahn7qorv8ai8q

 

And a nucleol053 board, confugured some pins  as TSC. Connected them via jumper cable to the atmel board, adapted the stm32 tsc userfiles-> worked. Nice signal levels.