Hi everyone, I need a solution to extend battery life in XDK. My code listens the light sensor and when anomaly detected it sends data with wifi. Therefore I want to put wifi to hibernate mode after sending and waking up again after detection. Because CC3100 has 4 microA power usage under hibernate.
I use basic WLAN initialization:
//inside setup function Retcode_T retcode = WLAN_Setup(&WLANSetupInfo); //inside enable function Retcode_T retcode = WLAN_Enable();
and I want to trigger hibernate and wakeup inside Fire function. How I can activate hibernate mode ?
Solved! Go to Solution.
Since workbench v3.6.0, Wlan Power management support has been added.
You can use the interface function WlanNetworkConnect_PowerControl() by including BCDS_WlanNetworkConnect.h (Platform\Wlan\include) in your application. Power modes are configurable as function parameter. Following power modes are supported,
Recommand you to read the function interface documentation and also CC3100 WiFi chip documentation to get futher insight of WiFi power management.
@Padmapriya thanks for your answer but fire function gets freeze after this line:
It works with no problem if I remove power control lines. After few minutes waiting I got:
INFO | XDK DEVICE 1: ************RESET CAUSE: WATCHDOG************
Error on device. What can be the reason ?
Watchdog reset is triggered by the application. Watchdog is already implemented and enabled; is fed only in idle task. If idle task is not executed, watchdog will not be fed; resulting in system reset after 4.26 minutes (watchdog timeout).
You can make sure that the application task is running. It occurs to me that the WiFi wakeup is incomplete and the control is not returned to application.
Please have a read about controller power cycle and WiFi power cycle regarding power management topics.