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).
/* 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.
before the cmuClock_RTC clock enable line.
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.
Problem persists in version v2 and v3.
...and v3.1, is this normal?