English
Language : 

EFM32WG Datasheet, PDF (129/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
There are individual bits for each oscillator indicating the status of the oscillator:
• ENABLED - Indicates that the oscillator is enabled
• READY - Start-up time is exceeded
• SELECTED - Start-up time is exceeded and oscillator is chosen as clock source
These status bits are located in the CMU_STATUS register.
11.3.2.2 Switching Clock Source
The HFRCO oscillator is a low energy oscillator with extremely short wake-up time. Therefore, this
oscillator is always chosen by hardware as the clock source for HFCLK when the device starts up (e.g.
after reset and after waking up from EM2 and EM3). After reset, the HFRCO frequency is 14 MHz.
Software can switch between the different clock sources at run-time. E.g., when the HFRCO is the
clock source, software can switch to HFXO by writing the field HFCLKSEL in the CMU_CMD command
register. See Figure 11.2 (p. 129) for a description of the sequence of events for this specific operation.
Note
It is important first to enable the HFXO since switching to a disabled oscillator will effectively
stop HFCLK and only a reset can recover the system.
During the start-up period HFCLK will stop since the oscillator driving it is not ready. This effectively
stalls the Core Modules and the High-Frequency Peripherals. It is possible to avoid this by first enabling
the HFXO and then wait for the oscillator to become ready before switching the clock source. This way,
the system continues to run on the HFRCO until the HFXO has timed out and provides a reliable clock.
This sequence of events is shown in Figure 11.3 (p. 130) .
A separate flag is set when the oscillator is ready. This flag can also be configured to generate an
interrupt.
Figure 11.2. CMU Switching from HFRCO to HFXO before HFXO is ready
CMU_CMD.HFCLKSEL
00
CMU_OSCENCMD.HFRCOEN
CMU_OSCENCMD.HFRCODIS
CMU_OSCENCMD.HFXOEN
CMU_OSCENCMD.HFXODIS
CMU_STATUS.HFRCORDY
CMU_STATUS.HFRCOENS
CMU_STATUS.HFRCOSEL
CMU_STATUS..HFXORDY
CMU_STATUS.HFXOENS
CMU_STATUS.HFXOSEL
HFCLK
HFRCO
HFXO
02
00
HFXO t im e-out period
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
129
www.energymicro.com