...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
390
www.silabs.com
23.3 Functional Description
An overview of the VCMP is shown in Figure 23.1 (p. 390) .
Figure 23.1. VCMP Overview
1.25V
BIASPROG
HYSTEN
EN
Warm - up
count er
Read only regist er
Read/ Writ e regist ers
LPREF
Scaler
TRIGLEVEL
V
DD
VCMPACT
VCMPOUT
INACTVAL
1
0
Edge int errupt
Warm up int errupt
PRS
HALFBIAS
The comparator has two analog inputs, one positive and one negative. When the comparator is active,
the output indicates which of the two input voltages is higher. When the voltage on the positive input is
higher than the negative input voltage, the digital output is high and vice versa.
The output of the comparator can be read in the VCMPOUT bit in VCMP_STATUS. Configuration
registers should only be changed while the comparator is disabled.
23.3.1 Warm-up Time
VCMP is enabled by setting the EN bit in VCMP_CTRL. When this bit is set, the comparator must stabilize
before becoming active and the outputs can be used. This time period is called the warm-up time. The
warm-up time is a configurable number of HFPERCLK cycles, set in WARMTIME, which should be set to
at least 10 µs. When the comparator is enabled and warmed up, the VCMPACT bit in VCMP_STATUS
will be set to indicate that the comparator is active.
As long as the comparator is not enabled or not warmed up, VCMPACT will be cleared and the
comparator output value is set to the value in INACTVAL in VCMP_CTRL.
One should wait until the warm-up period is over before entering EM2 or EM3, otherwise no comparator
interrupts will be detected. EM1 can still be entered during warm-up. After the warm-up period is
completed, interrupts will be detected in EM2 and EM3.
23.3.2 Response Time
There is a delay from when the actual input voltage changes polarity, to when the output toggles. This
period is called the response time and can be altered by increasing or decreasing the bias current to the
comparator through the BIAS and HALFBIAS fields in VCMP_CTRL as shown in Table 23.1 (p. 390)
. Setting a lower bias current will result in lower power consumption, but a longer response time.
Table 23.1. Bias Configuration
Bias Current (µA)
BIAS
HALFBIAS=0
HALFBIAS=1
0b0000
0.1
0.05
0b0001
0.2
0.1
0b0010
0.4
0.2
0b0011
0.6
0.3
Summary of Contents for EFM32TG
Page 543: ......