...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
335
www.silabs.com
ONESHOT, a single scan will be made when START in CMD is set. To start a new scan on a PRS
event, set START in CMD, set SCANMODE to PRS and configure PRS channel in PRSSEL. The PRS
start signal needs to be active for at least one LFACLK
LESENSE
cycle to make sure LESENSE is able
to register it.
Scan frequency
F
scan
= LFACLK
LESENSE
/((1 + PCTOP)*2
PCPRESC
)
(21.1)
It is possible to interleave additional sensor measurements in between the periodic scans. Issuing a start
command when LESENSE is idle will immediately start a new scan, without disrupting the frequency of
the periodic scans. If the period counter overflows during the interleaved scan, the periodically scheduled
scan will start immediately after the interleaved scan completes.
Figure 21.2. Scan sequence
CH3
CH5
CH9
CH3
CH5
CH9
START
START
Scan period
21.3.3 Sensor timing
For each channel in the scan sequence, the LESENSE interface goes through three phases: Idle
phase, excite phase, and measure phase. The durations of the excite and measure phases are
configured in the CHx_TIMING registers. LESENSE includes two timers: A low frequency timer,
running on LFACLK
LESENSE
, and a high frequency timer, running on AUXHFRCO. Timing of the excite
phase is done using these timers and can be either a number of prescaled AUXHFRCO cycles or
a number of prescaled LFACLK
LESENSE
cycles, depending on which one is selected in EXCLK. The
prescaling can be done by configuring LFPRESC in TIMCTRL for the low frequency timer, and the
high frequency timer prescaling factor is configured in AUXPRESC in the same register. The duration
of the measure phase is programmed via MEASUREDLY and SAMPLEDLY. The output of the ACMP
will be inactive for MEASUREDLY EXCLK cycles after start of the sensor measurement. Sampling of
the sensor will happen after SAMPLEDLY LFACLK
LESENSE
, or AUXHFRCO cycles, depending on the
configuration of SAMPLECLK. Figure 21.3 (p. 335) depicts a sensor sequence where excitation and
measure delay is timed using AUXHFRCO and the sample delay is timed using LFACLK
LESENSE
. The
configurable measure- and sample delays enables LESENSE to easily define exact time windows for
sensor measurements. A start delay can be inserted before sensor measurement begin by configuring
STARTDLY in TIMCTRL. This delay can be used to ensure that the DAC is done and voltages have
stabilized before sensor measurement begins.
Figure 21.3. Timing diagram, short excitation
EXCITE
SAMPLE
LFACLK
LESENSE
Idle phase
Ex cit e phase
Idle phase
Sam ple delay
Measure phase
START
AUXHFRCO
INIT
St art delay
Measure delay
DAC refresh st art
Summary of Contents for EFM32TG
Page 543: ......