Hi
I need your help to implement the RTC sleep mode on my nrf52 device. In my project, I have already using nrf_calendar.h
Thank you
Hi
I need your help to implement the RTC sleep mode on my nrf52 device. In my project, I have already using nrf_calendar.h
Thank you
Look at how most of our examples found in SDK\examples\ble_peripheral uses:
int main(void)
{
...
for (;;)
{
idle_state_handle()
}
}
The idle_state_handle() puts the device in sleep until an event wakes it up. In order to wake on RTC, you just need to set up an RTC timer with an interrupt. If I am not mistaken, the nrf_calendar example that you found on github (not an official and maintained example, but written by someone from Nordic, and put it out because it may be useful for someone, like yourself) already has set up this timer, and triggers the interrupts.
Is that what you were looking for? If not, please specify what you are missing.
Best regards,
Edvin
Thank you for your reply Edvin,
I have already tried the above things. But, I need to implement the sleep mode for a specific time(That sleep time can be configured at any time by the user). That also be in power management mode. That's, why I have chosen system off sleep mode, using RTC
Mr.NCK said:That's, why I have chosen system off sleep mode, using RTC
That is not possible. You can't have any timers running in system off sleep. Only pin interrupts can wake the nRF from system off (or NFC). So system on is your only choice. If you don't want the periodic wakeups from the calendar module you need to disable it, or alternatively change it to less frequent interrupts (since this is what is used to keep track of time, you might not want to disable it).
For system off, please check the documentation.
"System OFF is the deepest power saving mode the system can enter. In this mode, the system’s core functionality is powered down and all ongoing tasks are terminated."
meaning no clocks will run.
BR,
Edvin

Hi Edvin,
I have used the calendar module for time sync with milliseconds. So, According to our requirements, I can't able to disable that module. For sleep time I try to implement as flow in the image.
Thank you,

Hi Edvin,
I have used the calendar module for time sync with milliseconds. So, According to our requirements, I can't able to disable that module. For sleep time I try to implement as flow in the image.
Thank you,