EasyManua.ls Logo

NXP Semiconductors KL25 Series - Current Source

NXP Semiconductors KL25 Series
807 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
42.4.8 Current source
The TSI module supports eight different current source power to increment from 500 nA
to 64uA. The TSI_GENCS[EXTCHRG] bits determine the current of electrode oscillator
that charges and discharges external electrodes. The TSI_GENCS[REFCHRG] bits
determine the current of reference oscillator on which the internal reference clock
depends. The lower current source takes more time for charge and discharge, which is
useful to detect high-accuracy change. The higher current source takes less time, which
can be used to charge a big electrode by less power consumption.
The TSI_GENCS[CURSW] bit allows the current source to swap, so that the reference
oscillator and electrode oscillator use the opposite current sources. When
TSI_GENCS[CURSW] is set and the current sources are swapped, the
TSI_GENCS[EXTCHRG] bits and TSI_GENCS[REFCHRG] bits still control the
corresponding current sources, that is, TSI_GENCS[EXTCHRG] controls the reference
oscillator current and TSI_GENCS[REFCHRG] controls the electrode oscillator current.
42.4.9 End of scan
As a scan starts, [SCNIP] bit is set to indicate scan is in progress. When the scan
completes, the [EOSF] bit is set. Before clearing the [EOSF] bit, the value in
TSI_DATA[TSICNT] must be read. If the TSI_GENCS[TSIIEN] bit is set
andTSI_GENCS[DMAEN]is not set, an interrupt is submitted to CPU for post-
processing immediately. The interrupt is also optional to wake MCU to execute ISR if it
is in low power mode. When DMA function is enabled by setting TSI_GENCS[TSIIEN]
and TSI_GENCS[ESOR], as soon as scan completes, a DMA transfer request is asserted
to DMA controller for data movement, generally, DMA engine will fetch TSI conversion
result from TSI_DATA register,store it to other memory space and then refresh the TSI
scan channel index(TSI_DATA[TSICH]) for next loop. When DMA transfer is done,
TSI_GENCS[EOSF] is cleared automatically.
42.4.10 Out-of-range interrupt
If enabled, TSI will scan the electrode specified by TSI_DATA[TSICH] as soon as the
trigger arrives. The TSI_GENCS[OUTRGF] flag generates a TSI interrupt request if the
TSI_GENCS[TSIIE] bit is set and GENCS[ESOR] bit is cleared. With this configuration,
after the end-of-electrode scan, the electrode capacitance will be converted and stored to
the result register TSI_DATA[TSICNT], the out-of-range interrupt is only requested if
Chapter 42 Touch Sensing Input (TSI)
KL25 Sub-Family Reference Manual, Rev. 3, September 2012
Freescale Semiconductor, Inc. 799

Table of Contents

Related product manuals