cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone help me understand this code for the touch sense controller?

maryam magdy
Associate II

https://github.com/eleciawhite/STM32Cube/blob/master/STM32Cube_FW_F3_V1.3.0/Projects/STM32373C_EVAL/Examples/TSC/TSC_BasicAcquisition_Interrupt/Src/main.c what I don't understand are these definitions:

IoConfig.ChannelIOs = TSC_GROUP8_IO1;

IoConfig.SamplingIOs = (TSC_GROUP7_IO4 | TSC_GROUP8_IO4);

IoConfig.ShieldIOs = TSC_GROUP7_IO3;'

Any idea what are these? Shouldn't I just define the channels?

5 REPLIES 5
T J
Lead

this is the manual I followed, AN4312

it all works well.

Defined in

STM32Cube_FW_F3_V1.10.0\Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_tsc.h

These seem to be consistently used throughout the F3 example trees.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Other thread https://community.st.com/s/question/0D50X00009ZDyi0SAD/how-to-use-embedded-touch-sense-controller-ts-on-stm32l432kc

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
maryam magdy
Associate II

My problem now when I operate the code in the link , it stops at step #-6- "Check if the acquisition is correct (no max count) "

 if (HAL_TSC_GroupGetStatus(&TscHandle, TSC_GROUP1_IDX) == TSC_GROUP_COMPLETED)

The above If condition is never true and thus the acquisition is never completed. Any idea what could be wrong?

Really not sure who here has responsibility for Touch, perhaps an FAE can step up

@STOne-32​ @brk​ 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..