Skip to main content
New.Fish
Associate III
October 28, 2018
Question

STM32F072B-Discovery TSC Cube Project

  • October 28, 2018
  • 3 replies
  • 1124 views

I try to generate TSC project by using STM Cube,but I am not sure how to write this function: void HAL_TSC_ConvCpltCallback(TSC_HandleTypeDef* htsc).

There is same function in "STM32Cube\Repository\STM32Cube_FW_F0_V1.9.0\Projects\STM32F072B-Discovery\Applications\TouchSensing..", but it fails on my compiler.

Can anyone share ?

This topic has been closed for replies.

3 replies

Technical Moderator
October 30, 2018

Hello,

Please, try to debug and identify what is going wrong in your case.

Could you please precise what is the encountered issue?

Did you reproduce the issue with the TouchSensing example available under STM32CubeF0 firmware package?

The UM1785 User manual "Description of STM32F0 HAL and low-layer drivers" may helps you on how to use HAL functions.

https://www.st.com/content/ccc/resource/technical/document/user_manual/2f/77/25/0f/5c/38/48/80/DM00122015.pdf/files/DM00122015.pdf/jcr:content/translations/en.DM00122015.pdf

0690X000006CHjXQAW.jpg

Kind Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
New.Fish
New.FishAuthor
Associate III
November 5, 2018

Hi lmen,

Thanks for your reply. I will send you the whole project later.

Another question, can we view the charge and discharge waveform by oscilloscope during touch it?

For the STM32F072B-Discovery, PB0/PB1 is gropu1, PA6/PA7 is group2, PA2/PA3 is group3,

when I touch the sensor area, the LED will flash fast/slow according to the touch area, that mean TSC works,

but I can view no charge/discharge waveform at those pins.

If we debug TSC, is it possible to use oscilloscope to view waveform?

New.Fish
New.FishAuthor
Associate III
November 10, 2018

Hello lmen,

The attached file is the project generated by STM Cube version 26.1. I have problem to write the function:HAL_TSC_ConvCpltCallback( ) in main.c, I don't know how to use the variable "idx_bank".

Would you please help me to pass the compiler and some TSC function works on the STM32F072Disco board?