Putting '20732S into sleep or deep sleep mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
legic_1490776
Level 5
Level 5
25 likes received 10 likes received First like received

I saw a reference to sleep mode and deep sleep mode in another forum post, and I would like to understand how I can make my application enter these modes, and then wake up either after a set time or upon an interrupt.

Are there API calls that I can use to enter a sleep mode, or do I simply need to make sure I have stopped various services to enter sleep?  If so, how do I shut down everything needed to enter sleep?

For deep sleep, how do I enter it and how can I tell that I am coming back out of deep sleep mode?

What 'objects' prevent entering sleep mode, and how can I disable them so that sleeping can proceed?

1 Solution

I have found answers to some of my questions:

1. Power save timeout.  It appears to be the case that if you enable the "power save timeout" feature, it will override the wakeup settings.  That is, in my code I am enabling wakeup from sleep with this:

    devlpm_init();

    devlpm_enableWakeFrom(DEV_LPM_WAKE_SOURCE_GPIO);

However if I enable the power save timeout my system no longer wakes up on GPIO interrupts.

Does the power save timeout do anything else that I would want to replicate in order to save power?

What does the power save timeout do other than initialize LPM?

I don't have an answer for this one.

2. Time spent in deep sleep.  I have figured out that you enter deep sleep by calling

    bleprofile_PrepareHidOff()

Is there any way to know how long the system has been in deep sleep, or are the counters and clocks shut down?

I don't think ever got a definitive answer on this, but the answer appears to be "no", there is no way to tell the amount of time spent in an hidoff state.  When returning from either deep sleep or timed sleep, there is a way to tell whether you are returning from a sleep state, but I gather there is no way to find out how long you were there, even if you are in a timed sleep that was running a clock / counter during sleep.  If anyone knows differently I would be glad to hear it because currently my design must include an external RTC chip and crystal to address this issue.

3. Overall current draw in different modes.

   Powered at 3V, i've been observing 20 microamps draw in deep sleep mode, and about 55 microamps otherwise when the system is not doing very much.  Are these the numbers you would expect?  Is the 55 microamps figure already in a sleep mode?

These are not numbers that anyone should expect.  Deep sleep should draw 1 or 2 microamps.  You can observe this using the BLE tag kit, although you must be sure to disable the regulator and disconnect the serial USB chip to achieve this.  In my case, the extra 20 microamps was a side effect of a problem with my layout that provided inadequate ground connections.  This caused a lot of other problems as well.  I don't know what might have been the cause, but I suspect that some slight voltage drops under load caused the power circuitry inside the module to misbehave.

View solution in original post

0 Likes
9 Replies