8 years, 3 months ago.

Is there anything that would prevent wakeup from deep sleep?

I'm creating a program using the deep sleep mode on a new mDot module but I'm finding that its not waking up from the deep sleep as expected. It goes through the program, creates data and sends it. It then goes into deep sleep mode and never wakes up. Is there a way to determine why its not waking up?

The function calls are the same as in the example:

        // Should  sleep here and wakeup after a set 10 minute interval.
        // in the 868 (EU) frequency band, we need to wait until another channel is available before transmitting again
        uint32_t sleep_time = std::max((uint32_t)600000, (uint32_t)dot->getNextTxMs()) / 1000;
        logInfo("going to sleep for %d seconds", sleep_time);

        // go to deepsleep and wake up automatically sleep_time seconds later
        dot->sleep(sleep_time, mDot::RTC_ALARM);

The trace log I see is:

[TRACE] Set Frequency: 868500000
[DEBUG] Send on normal lora channel
[TRACE] Frequency: 868500000 Datarate: 12 BW: 125 POW: 14
[DEBUG] Time on air: 32 bytes 1810 ms
[TRACE] Band: 1 100
[TRACE] Duty cycle: 1.0%
[DEBUG] Time off air: 181000 ms
[INFO] send data: 32383944433142322c31332e302c33302c3239
[TRACE] Band: 1 181000
[TRACE] Band: 1 181000
[TRACE] Band: 1 181000
[INFO] going to sleep for 600 seconds
[TRACE] 0 : 0
[TRACE] 1 : 181000
[TRACE] 2 : 0
[TRACE] 3 : 0
[TRACE] configuring wakeup timer for 600 seconds from now
[TRACE] save timers: 179066 0 0 0
[INFO] entering deepsleep modeÿ

...and thats where it stays.

I do have other programs with the sleep that do work and cant see any difference other than what is being sent in the payload.

The application summary shows 118K Flash and 7.5K RAM used, which for the mDot is not a lot.

Thanks

Andrew

Question relating to:

Connecting to gateway, sending packets with a MultiTech mDot and entering deepsleep mode between transmissions. Lora, low power, mdot, multitech, Sleep

I'm getting similar - mdot not waking up from RTC- ( mbed version 112 )

posted by Daniel de kock 27 Jan 2016

1 Answer

8 years, 3 months ago.

Andrew, Are you building your application using rev 111 of the mbed library? If so, you need to roll it back to 110 or earlier. The RTC was pretty much completely broken in rev 111 and the RTC alarm is what we're using to wake up the mDot from sleep modes.

I opened a ticket for this a few weeks ago. I think they have fixed the bug, so it should be resolved in the next mbed release.

This smells like a rev 111 issue, but let us know if rolling back doesn't resolve the issue!

Cheers,

Mike

Accepted Answer

Just got a 112 update in the past few minutes so I'll give that a try instead, if not then I'll roll back a version or 2. What about mbed-rtos too?

thanks

Andrew

posted by Andrew Lindsay 13 Jan 2016

We haven't had any issues with mbed-rtos, just mbed itself.

posted by Mike Fiore 13 Jan 2016

The latest 112 update seems to be ok now. Thanks.

posted by Andrew Lindsay 14 Jan 2016

.

posted by Nicolas Schteinschraber 25 Jan 2016