Waspmote has 4 operational modes:
Operational Mode | Consumption | Microcontroller | Cycle | Accepted interruptions |
---|---|---|---|---|
On | 17 mA | On | - | All interruption sources |
Sleep | 30 μA | On | Depends on INT source | All interruption sources |
Deep Sleep | 33 μA | On | 1 s – 31 days | All interruption sources (RTC always used) |
Hibernate | 7 μA | Off | 1 s – 31 days | Only RTC |
On the other hand, each module (radio, sensor board, etc) might have up to several operation modes.
For complete information about interruption types and their handling, see the "Interruption" chapter.
Related API libraries: WaspPWR.h, WaspPWR.cpp
All information about the programming and operation of interruptions can be found in the Interruptions Programming Guide.
All the documentation is located in the Development section in the Libelium website.
{warning.fa-dot} Note: Before setting Waspmote to a low-power consumption mode, it is always recommended to switch any communication module off.
In this mode, the main program is paused, the microcontroller passes to a latent state, from which it can be woken by all asynchronous interruptions and by the synchronous interruption generated by the Watchdog. When the Watchdog Timer is set up, the duration interval can be programmed from 16 ms to 8 s. Consumption in this state is 30 μA.
In this mode the microcontroller stops executing the main program. The program stack where all the variables and log values are stored keep their value, so when Waspmote returns to on mode, the next instruction is executed and the variable values are maintained.
The following example would set Waspmote in the Sleep mode for 32 ms. The microcontroller would be in a state of minimum consumption waiting for the synchronous interruption from the Watchdog:
{
PWR.sleep(WTD_32MS, ALL_OFF);
}
In this mode, the main program is paused, the microcontroller passes to a latent state from which it can be woken by all the asynchronous interruptions and by the synchronous interruption launched by the RTC. The interval of this cycle can go from seconds to minutes, hours, days. Consumption in this state is 33 μA.
In this mode the microcontroller stops executing the main program. The program stack where all the variables and log values are stored keep their value, so when Waspmote returns to on mode, the next instruction is executed and the variable values are maintained.
In this mode, the main program stops, the microcontroller and all the modules are completely disconnected. The only way to reactivate the device is through the previously programmed alarm in the RTC (synchronous interrupt). The interval for this cycle can go from seconds to minutes, hours or days. Almost all devices are totally disconnected from the battery: only the RTC is powered through the battery, from which it consumes 7μA.
In this mode the microcontroller does not store any values from variables or from the program stack. When leaving the Hibernate state the microcontroller is reset, so the setup and loop routines are run as if the main switch were activated.
The Hibernate mode requires the physical Waspmote's hibernate switch to be put in "enable" position. It is necessary to follow the next steps when executing the program for the first time after uploading it to Waspmote:
The following example would set Waspmote in the Hibernate mode for 2 days, 1 hour and 30 minutes. The microcontroller would be switched off waiting for the RTC to switch the device on again with a synchronous interruption.
{
PWR.hibernate("02:01:30:00", RTC_OFFSET, RTC_ALM1_MODE2);
}
Related API libraries: WaspPWR.h, WaspPWR.cpp
All information about the programming and operation of sleep modes can be found in the Interruptions Programming Guide.
All the documentation is located in the Development section in the Libelium website.