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
  • No one would recommend external RTC component unless you want to get time triggers when nRF5x chip is in SYSTEM OFF mode. In normal operation (when it switches between normal operation of MCU and SYSTEM ON SLEEP when it waits for event/interrupt) you can use internal RTC for basic time keeping and periodical wake-ups. Most people use app_timer library (see SDK examples) but indeed you can write simpler custom "library" if you need/want.

  • 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

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

Children
No Data
Related