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

eaDesigner missing code statement for RTC

Hello,

 

I noticed a missing clock enable statement in the auto-generated code when I try to use the RTC module.

 

Target processor: EFM32LG33oF256

eaDesigner tool version: 1.10

Configuration: enable RTC module, use default settings for everything else (internal HF and LF RC oscillators).

 

Generated code:

  /* Enable clock for RTC */
  CMU_ClockEnable(cmuClock_RTC, true);
  /* Custom initialization for RTC */
  RTC_setup();

 

Problem: the register accesses to the RTC module that are done in the autogenerated RTC_setup function fail because the interface to the low-speed peripherals is not clocked yet.

 

Workaround: add

CMU_ClockEnable(cmuClock_CORELE, true);

 before the cmuClock_RTC clock enable line.

 

 

Posts: 556
Registered: ‎05-14-2012

Re: eaDesigner missing code statement for RTC

Hi hollie

 

You are right, this is an error in the generated code, the clock for the LE interface should also be enabled. The workaround you propose should work fine. Thanks for telling us! I will report it so we can get it fixed. 

 

R

Posts: 10
Registered: ‎03-05-2015

Re: eaDesigner missing code statement for RTC

Problem persists in version v2 and v3.

 

Rasto

Highlighted
Posts: 10
Registered: ‎03-05-2015

Re: eaDesigner missing code statement for RTC

...and v3.1, is this normal?

 

Rasto