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

time keeping during sleep

Hello experts,

I am getting into the word of Nordic and hence here is my first question. Kindly help.

Software version: SDK-14 Hardware revision: nRF52832 DK (PCA10040)

I am using BLE_CENTRAL mode on nRF52832 and it works great out of the box :) For certain reasons, I need to keep track of certain jobs in my project and hence I need a functionality similar to RTC. When browsed through the forum, I found that for RTC timekeeping, having a separate HW module was recommended. Instead of this, I went ahead with my design using "application_timer" and my solution just works great.

My device is battery operated and and now I want to save some battery life. Below is the sequence of operations I would like to do in my software.

  1. Run software and do desired actions.
  2. Note down the sleep entry "timestamp" & then enterr sleep mode to save power.
  3. Wake up on button push interrupt.
  4. Now record the button push time stamp.

Above said sequence will help me to determine the total sleep duration.

Any suggestions?

Thanks

Parents Reply Children
  • Thanks for the answers.

    But, as I am using nRF52x as Central, I would like to wake up only on receiving scan packet.(I don't need periodic wake up) or wakeup on Button press events

    But, once I wake up from sleep, I need to know what is the sleep duration (say 1 minues/10 minutes/1hr etc).

    May be this should be separate question/post. I have noticed that nRF52x wake-ups periodically with active sleep or power management provided in SDK14

  • If you want to scan it can be done only as periodic activity;) That's how BLE works, there is no magic which would wake you up once some 2.4GHz photons hit your antenna... in addition while CPU is in SLEEP any HW peripheral can continue in autonomous operation so you can run RTC and simply check counter once you wake-up. There are examples of all the basics in nRF5 SDK, I'd say spend few weeks with it to get familiar and then most of things will be clear.

Related