cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072B-Discovery TSC Cube Project

New.Fish
Associate III

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 ?

3 REPLIES 3
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
New.Fish
Associate III

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
Associate III

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?