Reply
Posts: 78
Registered: ‎02-05-2014

EFM32 configurator code incorrect when only using LFXO

 

Hello,

 

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,

 Lieven.

Highlighted
Posts: 2,384
Registered: ‎10-14-2014

Re: EFM32 configurator code incorrect when only using LFXO

@hollie

It looks like this is strange.

I created an internal ticket to track this.

WeiguoLu
Posts: 78
Registered: ‎02-05-2014

Re: EFM32 configurator code incorrect when only using LFXO

Hello @delu,

 

any update on this ticket? I just want to let you know that the problem is still present in latest Simplicity Studio.

 

Best regards,

 Lieven.

Posts: 2,384
Registered: ‎10-14-2014

Re: EFM32 configurator code incorrect when only using LFXO

EFM32ESS-3616

Sorry I would push to see if there any update and would come back and let you know.

WeiguoLu
Posts: 78
Registered: ‎02-05-2014

Re: EFM32 configurator code incorrect when only using LFXO

Hello @delu,

 

thank you!

 

Best regards,

 Lieven.