RTC clock need for sleep mode?

Hello,
Based on the “ble_peripheral_server_hrp_fota_sleep” sample,
Cannot enter the sleep mode if I disable the RTC after Sleep_Mode_Configure() like below in the main().

Sleep_Mode_Configure(&sleep_mode_env);
ACS_RTC_CTRL->ENABLE_ALIAS = RTC_DISABLE_BITBAND;
Main_Loop();

RTC must be enabled for sleep mode?

Thanks,
Calvin

@Calvin
If you enter :

Sleep_Mode_Configure(&sleep_mode_env);
ACS_RTC_CTRL->ENABLE_ALIAS = RTC_DISABLE_BITBAND;
Main_Loop();

in peripheral_server_sleep, you will see sleep example can’t work.
In the peripheral_server_sleep, we don’t use wakeup from RTC ( like RTC alarm).

For peripheral_server_sleep, we do use BB clock for sleep as you can see on the picture below:

How to select clock for RTC clock? This RTC clock is for sleep. (low power sleep clock)
In the Sys_PowerModes_Sleep_Init_2Mbps(), we have:

 /* Select the clock source for RTC */
    *((volatile uint8_t *) &ACS->RTC_CTRL) = sleep_mode_env->rtc_ctrl | RTC_ENABLE; 

From this, we might think we need RTC_ENABLE to select RTC clock source.

If we set RTC_DISABLE, we might have no clock for low power sleep clock.

In RSL10 hardware reference document, we could see this.

1 Like