...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
99
www.silabs.com
Each Low Energy Peripheral that is clocked by LFBCLK has its own prescaler setting and enable bit.
The prescaler settings are configured using CMU_LFBPRESC0 and the clock enable bits can be found
in CMU_LFBCLKEN0.
11.3.1.6 PCNTnCLK - Pulse Counter n Clock
Each available pulse counter is driven by its own clock, PCNTnCLK where n is the pulse counter instance
number. Each pulse counter can be configured to use an external pin (PCNTn_S0) or LFACLK as
PCNTnCLK.
11.3.1.7 WDOGCLK - Watchdog Timer Clock
The Watchdog Timer (WDOG) can be configured to use one of three different clock sources: LFRCO,
LFXO or ULFRCO. ULFRCO (Ultra Low Frequency RC Oscillator) is a separate 1 kHz RC oscillator
that also runs in EM3.
11.3.1.8 AUXCLK - Auxiliary Clock
AUXCLK is a 14 MHz clock driven by a separate RC oscillator, AUXHFRCO. This clock is used for flash
programming and Serial Wire Output (SWO). During flash programming, this clock will be active. If the
AUXHFRCO has not been enabled explicitly by software, the MSC module will automatically start and
stop it. The AUXHFRCO is enabled by writing a 1 to AUXHFRCOEN in CMU_OSCENCMD. This explicit
enabling is required when SWO is used.
11.3.2 Oscillator Selection
11.3.2.1 Start-up Time
The different oscillators have different start-up times. For the RC oscillators, the start-up time is fixed,
but both the LFXO and the HFXO have configurable start-up time. At the end of the start-up time a ready
flag is set to indicated that the start-up time has exceeded and that the clock is available. The low start-
up time values can be used for an external clock source of already high quality, while the higher start-up
times should be used when the clock signal is coming directly from a crystal. The startup time for HFXO
and LFXO can be set by configuring the HFXOTIMEOUT and LFXOTIMEOUT bitfields, respectively.
Both bitfields are located in CMU_CTRL. For HFXO it is also possible to enable a glitch detection filter
by setting HFXOGLITCHDETEN in CMU_CTRL. The glitch detector will reset the start-up counter if a
glitch is detected, making the start-up process start over again.
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. 100) 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.
Summary of Contents for EFM32G
Page 505: ......