how are capsense pins defined, e.g. TSC_GROUP4_IO1 does not correlate.
also any links to capsense info beyond AN4310 would be appreciated
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
Try This document.
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.
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.
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
This is the mapping of physical pins to Gx_IOy, from the DS, for Group 6 (into which fall both your "fingers"):
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.
mentioned above, TSC_IOSCR reg assigns the sampl. capacitor bit to external pins through AF.
Retrieving data ...