Hibernating mode.

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
Post Reply
beyonlo
Posts: 58
Joined: Thu Nov 26, 2015 8:03 pm

Hibernating mode.

Post by beyonlo » Thu Nov 26, 2015 8:06 pm

Hi all!
In the Hibernating mode (wifi off - 5uA) all python code still running? How that works?

Thanks.

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Hibernating mode.

Post by danicampora » Fri Nov 27, 2015 9:33 am

Hi,

No, in hibernate mode no code is running. It's meant to save power. When waking up from hibernate the MCU will "reset" and start execution from scratch, so you need to check the reset_cause to decide how to proceed.

beyonlo
Posts: 58
Joined: Thu Nov 26, 2015 8:03 pm

Re: Hibernating mode.

Post by beyonlo » Mon Nov 30, 2015 12:04 am

1. How go to hibernate mode?
2. How get ou from hibernate mode?

Are there a method hibernate_mode(time in ms) on python? So after that time system come back?

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Hibernating mode.

Post by kfricke » Mon Nov 30, 2015 6:52 am

There is some documentation you need to read to understand how this works. In general you need to select a sleep mode and enter it "after" you did set the RTC alarm for a given number of milliseconds (the time you intend to sleep).
beyonlo wrote:1. How go to hibernate mode?
This part describes how to enter the different sleep modes (in particular the methods idle(), sleep() and deep_sleep()).
2. How get ou from hibernate mode?
The RTC alarm does trigger the interrupt which you need to use to wake yourself up from the sleep methods. You do not need to set the RTC to a correct time, if your only intent is to sleep for a few microseconds.
You should skip the repeated RTC alarm (second argument to the alarm() method), since there seems to be a bug in current firmware versions, regarding this.

When using deep_sleep() your WiPy board starts up as if you did just boot it. There is a way to differentiate the RTC wakeup from an normal system start, in case you need to know this.
Using sleep() or idle() only suspends for a given number of milliseconds and does not enter real low power sleep. The two (not so deep sleep modes) idle() and sleep() do also keep WLAN up and connected.

Post Reply