Getting STMTouch driver to work with HAL and CubeMX on STM32F051 (with TSC)
Hello,
i am trying to get the 32F0-TOUCH-LIB to work, but so far i didn't succeed.
Processor is an STM32F051C4Tx on a custom board, which works except for the touch functions. There is a touch button for Proximity sensing and two sliders for input.
The project was created with STM32CubeMx (Version 5.2.1):
TSC peripherial:
Middleware: Touchsensing
- Is Enabled
- TSLPRM_TOTAL_TOUCHKEYS =1
- IO_TOUCHKEY1=G4_IO4
The code is generated for Atollicstudio and compiles.
And the following changes are made:
- tsl_user_Init() called after MX_TSC_Init() and MX_TOUCHSENSING_Init()
- In the infinite loop tsl_user_Exec() is called
The tsl_user_Exec() always returns TSL_USER_STATUS_BUSY and no activity can be observed at the IO-Port with an oscilloscope.
I compared the functions calls with the STMTouch Driver user manual and everything matches. I even checked the TSL_tim_ProcessIT() call in the Systick ISR. The TSC IRQ doesn't seem to be used in the libraries, because the IRQ-flag gets polled in the tsl_user_Exec().
I believe i missed a small detail, but i can't figure it out myself. I hope that somebody, more experienced with this library can give me a hint...
Thanks in advance
Jan