...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
355
www.silabs.com
• Comparator output direct on PRS
• Comparator output on GPIO through alternate functionality
• Output inversion available
23.3 Functional Description
An overview of the ACMP is shown in Figure 23.1 (p. 355) .
Figure 23.1. ACMP Overview
Scaler
1.25 V
2.5 V
ACMPn_CH7
ACMPn_CH0
ACMPn_CH6
ACMPn_CH5
ACMPn_CH4
ACMPn_CH3
ACMPn_CH2
ACMPn_CH1
Out put t o PRS
Out put t o GPIO
VDDLEVEL
NEGSEL
POSSEL
BIASPROG
HYSTSEL
EN
ACMPACT
ACMPOUT
INACTVAL
Warm - up
count er
GPIOINV
000
-
111
0000
-
1011
V
DD
1
0
Read only regist ers
Read/ Writ e regist ers
LPREF
Edge int errupt
Warm up int errupt
HALFBIAS
FULLBIAS
V
DD_SCALED
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 voltage on the negative input, the digital output is high and vice versa.
The output of the comparator can be read in the ACMPOUT bit in ACMPn_STATUS. It is possible to
switch inputs while the comparator is enabled, but all other configuration should only be changed while
the comparator is disabled.
23.3.1 Warm-up Time
The analog comparator is enabled by setting the EN bit in ACMPn_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 peripheral clock (HFPERCLK) cycles,
set in WARMTIME, which should be set to at least 10 µs but lengthens to up to 1ms if LPREF is enabled.
The ACMP should always start in active mode and then enable the LPREF after warm-up time. When
the comparator is enabled and warmed up, the ACMPACT bit in ACMPn_STATUS will indicate that the
comparator is active. The output value when the comparator is inactive is set to the value in INACTVAL
in ACMPn_CTRL (see Figure 23.1 (p. 355) ).
An edge interrupt will be generated after the warm-up time if edge interrupt is enabled and the value set
in INACTVAL is different from ACMPOUT after warm-up.
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.
Summary of Contents for EFM32G
Page 505: ......