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
]]>