English
Language : 

K60P100M100SF2RM Datasheet, PDF (1784/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Functional descriptions
It is worthy to note that, since all the possible flags are asserted upon the end of scan
event, in TSI interrupt service routine, the end-of-scan flag will be always set until the
software clears it.
55.7.3.4.4 Over-run interrupt
If an electrode scan is in progress and there is a scan trigger, the electrode scan unit
generates an over-run error by asserting the GENCS[OVRF]. If the TSI error interrupt is
active by setting the GENCS[ERIE] bit a interrupt request is asserted. The OVRF flag is
cleared by writing 1 to it.
55.7.4 Touch detection unit
The touch detection unit is responsible to detect electrode capacitance changes. It also
detects the occurrence of error with the electrode in case the capacitance result is 0x0000
or 0xFFFF. The errors can be caused by the electrode pin shorted to VDD or VSS or by
electrode capacitances out of the configuration range of the TSI module.
55.7.4.1 Capacitance change threshold
Each TSI pin has its result register TSICHnCNT. At the end of each electrode conversion
the touch detection unit compares if the TSICHnCNT result value is inside a configurable
range. The comparison range is defined individually for each TSI pin by the following
registers, TSICHnHTH, the upper threshold value and TSICHnLTH, the lower threshold
value. If the TSICHnCNT happens to be out of the range defined by TSICHnLTH and
TSICHnHTH the GENCS[OUTRGF] flag is set. Also the corresponding bit
STATUS[ORNGFx] is set indicating which electrode pins happened to have their result
register out-of- range.
To clear the GENCS[OUTRGF] write 1 to it.
55.7.4.1.1 Out-of-range interrupt
The GENCS[OUTRGF] flag generates a TSI interrupt request if the GENCS[TSIIE] bit
is set and the GENCS[ESOR] bit is cleared. With this configuration, after the end-of-
electrode scan, the TSI interrupt is only requested if there is a capacitance change. The
capacitance change is detected when the result register gets outside the window defined
by the TSI_THRESHLD register. If the electrodes capacitance does not vary, the TSI
does not interrupt the CPU.
1784
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc.