Silicon Labs EFM32: How should the pins be configured when using an external crystal?
When using an external crystal as HFXO, use two pins, HFXTAL_P and HFXTAL_N. Pin setting (explicitly using Pin XXX as NFXTAL_P or NFXTAL_N) is unnecessary, so the default (Pin mode = disable) is fine.
Below is a sample code. The concept is the same for LFXO.
/* Enable HFXO as high frequency clock, HFCLK */
CMU_ClockSelectSet(cmuClock_HF,cmuSelect_HFXO);
/* Turn off HFRCO if not required */
CMU_OscillatorEnable(cmuOsc_HFRCO, false, false);
Depending on the sample code provided by the manufacturer,
/* Enable HFXO */
CMU_OscillatorEnable(cmuOsc_HFXO, true, true);
is described in some cases, but since the same thing is executed in CMU_ClockSelectSet(), it is practically unnecessary.
For settings when using an external oscillator, see another topic (How should I set the pins when using an external oscillator?).
Experienced FAE
Free consultation is available.
From specific product specifications to parts selection, the Company FAE will answer your technical concerns free of charge. Please feel free to contact us.