Light Sleep consumption changes depending on the timeout I set

LucasSossai
Posts: 1
Joined: Fri Nov 22, 2019 9:28 pm

Light Sleep consumption changes depending on the timeout I set

Postby LucasSossai » Fri Nov 22, 2019 9:33 pm

Greetings everyone,
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;
}

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: Light Sleep consumption changes depending on the timeout I set

Postby Her Mary » Fri Nov 29, 2019 11:05 am

How about the latest ESP8266 RTOS SDK? https://github.com/espressif/ESP8266_RT ... power_save

Who is online

Users browsing this forum: No registered users and 262 guests