2 years, 1 month ago.

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

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?

1 Answer

2 years, 1 month ago.

Hello Maryam,

Here is where the TSC_GROUPx_IOx pin masks are defined:


Looking at this document:


Starting at page 72, looking at the STM32F3 series, you can see the "TSC_GROUPx_IOx" signal names correlates with a particular pin on the boards. On page 90, you can see a hardware diagram of where those pins are mapped to. Hope this helps!

-Karen, team Mbed

If this solved your question, please make sure to click the "Thanks" link below!

Thank you for your reply. My problem now when I operate the code in the link is, 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?

posted by maryam magdy 02 Aug 2018