Skip to main content
emalund
Associate III
September 21, 2017
Question

capsense definitions

  • September 21, 2017
  • 7 replies
  • 1683 views
Posted on September 21, 2017 at 18:54

how are capsense pins defined, e.g. TSC_GROUP4_IO1 does not correlate.

also any links to capsense info beyond AN4310 would be appreciated

    This topic has been closed for replies.

    7 replies

    emalund
    emalundAuthor
    Associate III
    September 21, 2017
    Posted on September 21, 2017 at 19:20

    I am tasked with modifying something that has two 'finger caps' attached to PB 13 & 14, in the software they are described as group6_io3 and group 6_io4 which correlates bitwise to PB 10&11.  something does not make sense

    emalund
    emalundAuthor
    Associate III
    September 21, 2017
    Posted on September 21, 2017 at 21:05

    thanks, with that link and the reference manual page 810 I have gotten where the 'finger cap' is defined, not very intuitive, but oh well.  What I still can't find is the pin definition for the sampling cap. since I have to totally revise the capsense, I need to figure this out.

    waclawek.jan
    Super User
    September 21, 2017
    Posted on September 22, 2017 at 00:30

    Hi Erik,

    I don't use the TSC module and you did not tell us which chip are you using, but according to 'L4x5/4x6 RM you select the pins used for sampling capacitor in the TSC_IOSCR register.

    The signals numbers (Gx_IOy) are converted to physical pin number through the Alternate Function table from the respective datasheet, but you've probably figured that out already.

    Jan

    emalund
    emalundAuthor
    Associate III
    September 22, 2017
    Posted on September 22, 2017 at 14:35

    Hi, Jan it's been a while

    sorry I tell everybody to mention the chip and forget myself it is STM32F091

    The signals numbers (Gx_IOy) are converted to physical pin number through the Alternate Function table from the respective datasheet

    true for button pins, false for capacitor pins

    waclawek.jan
    Super User
    September 22, 2017
    Posted on September 22, 2017 at 15:45

    Erik,

    This is the mapping of physical pins to Gx_IOy, from the DS, for Group 6 (into which fall both your ''fingers''):

    0690X00000608KcQAI.png

    My understanding of TSC based on reading of RM0091 is, that

    - during one ''normal'' conversion, only one ''channel'' or ''electrode'' (which is one of your ''fingers'') input is used per group, selected by setting one bit in  TSC_IOCCR, respective to this input

    - there is one ''capacitor'' or ''sampling'' input per group, selected by setting one bit in  TSC_IOSCR (note that ST is kind enough to provide several names for the same functionality, keeping us alert while reading ;) )

    - in your case, as you have two ''fingers'', you have to perform two separate conversions, swapping the ''channel'' between them (i.e. rewriting TSC_IOCCR)

    So, you have to connect your sampling capacitor to PB11 or PB12 and set the according bit in TSC_IOSCR.

    I repeat that I have never used TSC just reread the RM chapter a couple of times.

    JW

    Vangelis Fortounas
    Associate II
    September 22, 2017
    Posted on September 22, 2017 at 15:06

    Hello !

    true for button pins, false for capacitor pins

    As

    Waclawek.Jan

    mentioned above, TSC_IOSCR reg assigns the sampl. capacitor bit to external pins through AF.

    0690X00000608KSQAY.png

    Rgrds

    vf