ESP8266 Developer Zone The Official ESP8266 Forum 2019-11-29T11:05:20+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=52379 2019-11-29T11:05:20+08:00 2019-11-29T11:05:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=52379&p=68493#p68493 <![CDATA[Re: Light Sleep consumption changes depending on the timeout I set]]> https://github.com/espressif/ESP8266_RT ... power_save

Statistics: Posted by Her Mary — Fri Nov 29, 2019 11:05 am


]]>
2019-11-22T21:33:48+08:00 2019-11-22T21:33:48+08:00 https://bbs.espressif.com:443/viewtopic.php?t=52379&p=68244#p68244 <![CDATA[Light Sleep consumption changes depending on the timeout I set]]> I'm having a problem while developing with ESP8266, my function enter_light_sleep works but the consumption changes depending on the time I set in the wifi_fpm_do_sleep() function.
If I set the max time (0xFFFFFFF) it works and go near 1,5 mA but never wakeups nor call the wake_cb function
If I set the time to something like 15s (15*1000*1000) it goes to 16 mA (Modem Sleep consumption) , it wakes up after 15s and calls my wake_cb function.

Any insights?

static void enter_light_sleep(void *arg)
{
mgos_uart_printf(UART_NO, "Enter_light_sleep \r\n");
wifi_station_disconnect();
wifi_set_opmode(NULL_MODE);
wifi_set_opmode_current(NULL_MODE);
wifi_set_sleep_type(LIGHT_SLEEP_T);
wifi_fpm_open();
wifi_fpm_set_wakeup_cb(wake_cb);
wifi_fpm_do_sleep(FPM_SLEEP_MAX_TIME);
(void)arg;
}

Statistics: Posted by LucasSossai — Fri Nov 22, 2019 9:33 pm


]]>