Code: Select all
WiFi.begin? - ULP Program? - Deep Sleep (uA)
N - N - ~8
Y - N - ~8
N - Y - 142
Y - Y - 270
But if WiFi.begin() is called before entering Deep Sleep, it rises to 270uA!? Why? That one line, WiFi.begin(), is literally the only difference; comment it out and it's back to 142uA. On the other hand, if I include WiFi.begin and I comment out ulp_run, then everything also successfully powers down and current draw is <10uA.
Put simply: It's only when the two - WiFi and ULP - are in combination that the mysterious extra current is drawn.
Additionally, it seems to scale with the frequency of the ULP program running (ie. by varying ulp_set_wakeup_period).
Code: Select all
ULP Interval (ms) - WiFi.begin (uA) - No WiFi (uA) - Difference (uA)
1 - 270 - 142 - 128
2 - 153 - 86 - 67
3 - 109 - 63 - 46
5 - 70 - 43 - 27
10 - 40 - 26 - 14
Why would this be? Is there anything I can do to power down whatever WiFi.begin() is causing to be powered while the ULP coprocessor is running in Deep Sleep?
More:
- Waking from high current, then going back to Deep Sleep without WiFi.begin resets current draw back down to expected
- Going back to Deep Sleep from a wake stub does not reset it, ie. high current draw persists