Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Sifourquier
#27088 Hi
For a project I need run code every 100ms and send data on wifi every minute.
The deepsleep take ~ 400ms to wakeup an go sleep and take high power in wekeup time. I don't can use deepsleep

Then i will use a sleep and not deepsleep but I have test

Code: Select allvoid user_rf_pre_init(void)
{
   system_phy_set_rfoption(4); //don't run RF
}

and
Code: Select allwifi_set_sleep_type(LIGHT_SLEEP_T ); in user_init


The power consumption are 12mA
But in this document he say we can have less of 1mA
https://nurdspace.nl/images/e/e0/ESP826 ... nglish.pdf

I have also test
while(1)
asm("WAITI 1\n"); //asm instruction for xtensa sleep
but after i have 70mA

Are you a idée for réducte to 1mA?

(in deep sleep I have <1mA and if I manualy stop the quartz by set a pad on gnd I have <1mA)
User avatar
By willfly
#27206
Code: Select allwifi_set_sleep_type(LIGHT_SLEEP_T );

will reduce sleep current for the period ESP8266 is sleeping. It will wake up periodically (every few ms) and do its wifi housekeeping, process interrupts etc and go back to sleep. When awake and doing wifi etc, current draw is 60-70 mA. Deepsleep is the only user controlled API.

Also light sleep will not kick in if:
- ESP is not in station mode
- not connected to an AP
- user loop executes faster then wifi beacon interval