Posts: 59
Registered: ‎02-05-2014

EFM32 configurator code incorrect when only using LFXO




I noticed in the latest version of Simplicity Studio that there is a problem when using the configurator to generate the code for the device initialization when your device only uses the LFXO.


The issue is that the HFXO is also enabled by the generated code. As the board I'm using has no HFXO mounted, the code hangs waiting for the HFXO to stabilize.


The specific device I'm using is the EFM32G222F64. Simplicity Studio was updated to the latest version today.


I have attached a minimal example that shows the behavior to this post.


When you look at it, you see that I'm only enabling the LFXO in the configurator.

The code generator however creates a CMU init function that contains enable functions for both XO's:


// CMU_enter_DefaultMode_from_RESET
extern void CMU_enter_DefaultMode_from_RESET(void) {

	// $[LFXO enable]
	CMU_OscillatorEnable(cmuOsc_LFXO, true, true);
	// [LFXO enable]$

	// $[HFXO enable]
	CMU_OscillatorEnable(cmuOsc_HFXO, true, true);
	// [HFXO enable]$

	// $[LFACLK Setup]
	// [LFACLK Setup]$

	// $[High Frequency Clock select]
	/* Using HFRCO at 14MHz as high frequency clock, HFCLK */
	CMU_ClockSelectSet(cmuClock_HF, cmuSelect_HFRCO);

	/* Enable peripheral clock */
	CMU_ClockEnable(cmuClock_HFPER, true);

	// [High Frequency Clock select]$

	// $[LF clock tree setup]
	/* No LF peripherals enabled */
	// [LF clock tree setup]$
	// $[Peripheral Clock enables]
	/* Enable clock for GPIO by default */
	CMU_ClockEnable(cmuClock_GPIO, true);

	// [Peripheral Clock enables]$



I think this is a bug that needs fixing.


Best regards,


Posts: 1,955
Registered: ‎10-14-2014

Re: EFM32 configurator code incorrect when only using LFXO


It looks like this is strange.

I created an internal ticket to track this.