Datasheet

Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
Advanced Features
In this chapter are shown some advanced features of the openPicus Framework. It is suggested to first learn
and use the standard functions of the Framework. The advanced features described below can lock the overall
system if used incorrectly.
The Energy Saving Modes
(Flyport Wi-Fi Only)
The openPicus Framework permits using advanced energy saving methods. This is an advanced
feature, and the Flyport's normal operations and functions will be different, and all the TCP/IP related
functions do not work in these modes. As a general rule, when in an energy saving mode, none of the
functions described in the chapter “Using the TCP/IP stack” should be used since are all TCP/IP
dependant.
There are two ways to reduce power consumption:
Turn OFF Wi-Fi transceiver only (Hibernate mode)
Turn OFF Wi-Fi transceiver and put in SLEEP state the microcontroller (Sleep mode)
Both modes turn OFF the Wi-Fi transceiver to save power, but the Sleep mode saves more power
since it stop the Microcontroller. Only the RTCC and external interrupts can wake up the
Microcontroller once it is in sleep mode.
Special considerations:
All the TCPSockets and UDPSockets must be reinitialized after waking up from hibernate or sleep
mode. This must be done each time the Flyport Wi-Fi wakes up, and for every Socket used, or the
Flyport will fail its tasks executions and will definitely be locked!
Please pay very special attention to socket handles as these are the most delicate software code for
power saving modes.
Hibernate Mode
Activating Hibernate mode, the Wi-Fi transceiver will be turned OFF, the OpenPicus Framework will
kill the TCP task, and only the user task will be executed. This is not the maximum power saving
mode, but PIC is still powered.
The functions described in “Controlling the Flyport hardware” chapter, and “RTCC peripheral module
can be used without any kind of warning as they are only PIC dependant.
To Activate Hibernate Mode WFHibernate();
This function activates the Hibernate mode, so turn OFF the Wi-Fi transceiver
To Deactivate the Hibernate Mode WFOn();
70