This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to implement Sleep Mode on "NRF52832" using RTC

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

Parents
  • 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

Reply
  • 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

Children
Related