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

Putting the nRF51-DK to sleep periodically

Hi,

I am using the capacitive sensing driver example given in the SDK(version 12.3) and it works fine. I want to extend the code to ensure that the SoC goes to sleep for 60 seconds and then wakes up for just one or two seconds to take measurements from the ADC (main aim is to reduce power consumption for my application). Is there a simple way of doing this?

Regards, Ehsan.

  • Hi Ehsan,

    nRF5x chips support two power saving modes: SLEEP and SYSTEM OFF. The first one is basically used in every application when there is nothing to process. System is then waiting for event and that can be timer interrupt or anything else. If you really want to go beyond that to nA range of SYSTEM OFF then you have problem with periodical wake-up because nRF5x chips don't have any clock capability in SYSTEM OFF. It can be woken up by external trigger so you would need to generate it from other MCU (if you have it in your system) or you would need to go for some discrete low power RTC which you set from nRF5x before setting it to SYSTEM OFF and it will wake it back by GPIO pulse.

    Cheers Jan

  • Hi Jan, The code I currently have makes use of the RTC to trigger ADC sampling. Is it possible to have multiple instances of the RTC simultaneously or would I have to reconfigure it during run-time? Thanks.

  • Hi, in case you don't use SoftDevice then you could employ both RTC blocks on nRF51. But more likely you cannot, then usual solution is to use Nordic app_timer library which allows "almost infinite" number of independent "timers" all living on top of single HW peripheral RTC block tick (this is quite common trick used in pretty much every embedded application). See nRF5 SDK for more, it's used in dozens of examples there.

Related