- Fri Jan 23, 2015 12:55 pm
#8029
Espressif's just now released SDK 0.9.5, and power management got much better. If wifi_set_sleep_type(LIGHT_SLEEP_T) is set, then module most of time switches between 3 modes:
- 70mA: active receive, it's also always active when NONE_SLEEP_T is set,
- 14mA: I guess radio is down, CPU active,
- 0.7mA: radio down, CPU/mem suspended (and it resumes without restart)
Now, I don't know why 14 mA mode should be ever active, maybe it's bug. So currently module wakes up for each DTIM, spends some time in 70mA state and returns to 14 or 0.7mA state and stays there until next broadcast. For some reason amount of time in 70mA state depends on DTIM interval. With beacon interval = 500ms and DTIM=3 typical time is 100-250ms. When beacon = 100ms and DTIM=3, it drops to 40-100ms. There is one more feature: when there is a lot of traffic, module goes into 70mA mode and stays there. Broadcast traffic also counts, so module may not sleep at all! It's difficult to guess how exactly estimation algorithm works, but I'd guess that threshold is about 5-10 packets/s sustained.
On 0.9.5-b1 (current nodecmu firmware) situation was much worse, it looked like sleep_type settings had no effect at all. Well, they had, in absense of broadcasts. And there was apparently no difference between MODEM and LIGHT modes, consumption was 14mA min no matter what I tried.
That's great that Espressif guys are actively working on the firmware. Maybe in a few releases PM bugs would be cleared out.