electrode scan unit also allows software triggering of the electrode scans. This feature isvery useful for initialization of the touch application to detect the initial electrodecapacitances. This module generates configurable end-of-scan interrupt to indicate theapplication that all electrodes were scanned. If a new electrode scan is started while theprevious one is still in progress, an overrun error flag is generated, TSI continues theprevious scan sequence and the latest trigger is ignored.52.3.3 Touch detection unitThe touch detection unit indicates the change in the pin capacitance. This modulecompares the pin capacitance value in the result register with a pre-configured low andhigh threshold. If the capacitance result register value is outside the ranges defined by theupper and lower threshold, the touch detection unit generates an out-of-range flag toindicate a pin capacitance change.The upper and lower threshold values are configurable allowing the application to selectthe magnitude of the capacitance change to trigger the out-of-range flag. With thethreshold values programmed properly the application noise level does not cause frequentCPU interrupts, so minimizes the CPU touch application usage. This feature also allowsthe TSI to wake up the CPU from low power modes only in a capacitance change event.52.4 Modes of operationThe TSI module has three operation modes: disabled, active mode and low power mode.52.4.1 TSI disabled modeWhen GENCS[TSIEN] is cleared, the TSI module is disabled.52.4.2 TSI active modeIn active mode, the TSI module has its full functionality, being able to scan up to 16electrodes. The TSI can be in active mode with the MCU in Run, Wait, VLPR, andVLPW modes, and the TSI can run in low power mode (only one electrode scanning inStop, VLPS, LLS, and VLLSx modes).Three clock sources can be selected for the TSI module in active mode: BUS_CLK,MCGIRCLK and OSCERCLK.Modes of operationK51 Sub-Family Reference Manual, Rev. 6, Nov 20111496 Freescale Semiconductor, Inc.