10.3.5 Clock Output on a Pin
It is possible to configure the CMU to output clocks on the CMU_CLK0 and CMU_CLK1 pins. This clock selection is done using the
CLKOUTSEL0 and CLKOUTSEL1 bitfields respectively in CMU_CTRL. The required output pins must be enabled in the CMU_ROU-
TEPEN register and the pin locations can be configured in the CMU_ROUTELOC0 register. The following clocks can be output on a
pin:
• HFSRCCLK and HFEXPCLK. The HFSRCCLK is the high frequency clock before any prescaling has been applied. The HFEXPCLK
is a prescaled version of HFCLK as controlled by the HFEXPPRESC bitfield in the CMU_HFPRESC register.
• The unqualified clock output from any of the oscillators (ULFRCO, LFRCO, LFXO, HFXO). Note that these unqualified clocks can
exhibit glitches or skewed duty-cycle during startup and therefore these clock outputs are normally not used before observing the
related ready flag being set to 1 in CMU_STATUS.
• The qualified clock from any of the oscillators (ULFRCO, LFRCO, LFXO, HFXO, HFRCO, AUXHFRCO). A qualified clock will not
have any glitches or skewed duty-cycle during startup. For LFRCO, LFXO and HFXO correct configuration of the TIMEOUT bit-
field(s) in CMU_LFRCOCTRL, CMU_LFXOCTRL and CMU_HFXOTIMEOUTCTRL respectively is required to guarantee a properly
qualified clock.
HFCLK will not have a 50-50 duty cycle when any other division factor than 1 is used in CMU_HFPRESC (i.e. if PRESC is not equal to
0). In such a case, the exported HFEXPCLK will therefore also not be 50-50 when its division factor is not set to an even number in
CMU_HFEXPPRESC.
10.3.6 Clock Input from a Pin
It is possible to configure the CMU to input a clock from the CMU_CLKI0. This clock can be selected to drive HFSRCCLK and DPLL
reference using CMU_HFCLKSEL and CMU_DPLLCTRL respectively. The required input pins must be enabled in the CMU_ROUTEP-
EN register and the pin locations can be configured in the CMU_ROUTELOC1 register.
10.3.7 Clock Output on PRS
The CMU can be used as a PRS producer. It can output clocks onto PRS which can be selected by a consumer as CMUCLKOUT0 and
CMUCLKOUT1. The clocks which can be produced via CMUCLKOUT0 and CMUCLKOUT1 are selected via the CLKOUTSEL0 and
CLKOUTSEL1 fields respectively in CMU_CTRL.
Note that the CLKOUTSEL0 and CLKOUTSEL1 fields are also used for selecting which clock is output onto a pin as described in
. In contrast with clock output on a pin however, output of a clock onto PRS does not depend on any
configuration of the CMU_ROUTEPEN and CMU_ROUTELOC0 registers.
10.3.8 Error Handling
Certain restrictions apply to how and when the CMU registers can be configured as is desribed for the respective registers. Not adher-
ing to these restrictions can lead to unpredictable and non-defined behaviour. Some of these software restrictions are checked in hard-
ware and not adhering to them will cause the CMUERR interrupt flag in CMU_IF to be set to 1. The restrictions impacting CMUERR are
as follows:
• CMU_HFRCOCTRL should not be written while HFRCOBSY in the CMU_SYNCBUSY register is set to 1.
• CMU_AUXHFRCOCTRL should not be written while AUXHFRCOBSY in the CMU_SYNCBUSY register is set to 1.
• CMU_HFXOSTARTUPCTRL, CMU_HFXOSTEADYSTATECTRL and CMU_HFXOTIMEOUTCTRL should not be written while
HFXOBSY in the CMU_SYNCBUSY register is set to 1. Note that writes to CMU_HFXOCTRL do not impact CMUERR. Although
most of its bitfields need to be configured before enabling the HFXO, it it allowed to change the AUTOSTART bits (i.e. AUTOSTART-
SELEM0EM1 and AUTOSTARTEM0EM1) at any time.
• HFXO should not be enabled before it has been properly disabled (so only enable HFXO when HFXOENS=0 or HFXOBSY=0). Like-
wise, HFXO should not be disabled before it has been properly enabled (so only disable HFXO when HFXOENS=1 or HFXOB-
SY=0).
• CMU_LFRCOCTRL should not be written while LFRCOBSY in the CMU_SYNCBUSY register is set to 1. The GMCCURTUNE bit-
field should not be written with a differing value while the LFRCOVREFBSY flag is set to 1.
• CMU_LFXOCTRL should not be written while LFXOBSY in the CMU_SYNCBUSY register is set to 1.
10.3.9 Interrupts
The interrupts generated by the CMU module are combined into one interrupt vector. If CMU interrupts are enabled, an interrupt will be
made if one or more of the interrupt flags in CMU_IF and their corresponding bits in CMU_IEN are set.
EFM32JG1 Reference Manual
CMU - Clock Management Unit
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 228