Silicon Laboratories EFR32xG14 Wireless Gecko Reference Manual page 290

Table of Contents

Advertisement

11.3.2.3 Switching Clock Source
The HFRCO oscillator is a low energy oscillator with extremely short start-up time. Therefore, this oscillator is always chosen by hard-
ware as the clock source for HFCLK when the device starts up (e.g. after reset and after waking up from EM2 Deep Sleep and EM3
Stop). After reset, the HFRCO frequency is 19 MHz.
Software can switch between the different clock sources at run-time. For example, when the HFRCO is the clock source, software can
switch to HFXO by writing the field HF in the CMU_HFCLKSEL command register. See
HFXO before HFXO is ready on page 290
Note:
Before switching the HFCLKSRC to HFXO via the HF bitfield in CMU_HFCLKSEL it is important to first enable the HFXO. Switching to
a disabled oscillator will effectively stop HFSRCCLK and only a reset can recover the system.
When selecting an oscillator which has been enabled, but which is not ready yet, the HFSRCCLK will stop for the duration of the oscilla-
tor start-up time 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 target oscillator (e.g. HFXO) and then waiting for that oscillator to become ready before
switching the clock source. This way, the system continues to run on the HFRCO until the target oscillator (e.g. HFXO) has timed out
and provides a reliable clock. This sequence of events is shown in
ready on page
291.
A separate flag is set when the oscillator is ready. This flag can also be configured to generate an interrupt.
CMU_CMD.HFCLKSEL
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
Figure 11.4. CMU Switching from HFRCO to HFXO before HFXO is ready
silabs.com | Building a more connected world.
for a description of the sequence of events for this specific operation.
Figure 11.5 CMU Switching from HFRCO to HFXO after HFXO is
00
HFXO
CMU - Clock Management Unit
Figure 11.4 CMU Switching from HFRCO to
00
HFXO time-out period
Reference Manual
Rev. 1.1 | 290

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EFR32xG14 Wireless Gecko and is the answer not in the manual?

Table of Contents