English
Language : 

EFM32WG Datasheet, PDF (662/834 Pages) List of Unclassifed Manufacturers – The EFM32WG Wonder Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive applications.
...the world's most energy friendly microcontrollers
• Configurable output when inactive
• Comparator output direct on PRS
• Comparator output on GPIO through alternate functionality
• Output inversion available
26.3 Functional Description
An overview of the ACMP is shown in Figure 26.1 (p. 662) .
Figure 26.1. ACMP Overview
POSSEL
ACMPn _CH0
ACMPn _CH1
ACMPn _CH2
ACMPn _CH3
ACMPn _CH4
ACMPn _CH5
ACMPn _CH6
ACMPn _CH7
D AC0 _CH0
D AC0 _CH1
000
-
111
EN
Warm -up
counter
ACMPACT
0000
-
1101
BIASPROG
HALFBIAS
FULLBIAS
HYSTSEL
1
0
INACTVAL
GPIOINV
NEGSEL
VDDLEVEL
LPREF
VDD_SCALED
Scaler
VDD
2.5 V
1.25 V
Warmup interrupt
Edge int errupt
ACMPOUT
Out put t o PRS
Out put t o GPIO
Read/Writ e regist ers
Read only regist ers
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.
26.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 26.1 (p. 662) ).
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.
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
662
www.energymicro.com