-
Notifications
You must be signed in to change notification settings - Fork 389
WiFi still works now after light-sleep (w/o powering down modem) #4826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| cfg.set_pwrctl_init(true); | ||
| cfg.set_rtc_dboost_fpd(true); | ||
| cfg.set_cpu_waiti_clk_gate(true); | ||
| cfg.set_bbpll_fpu(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at all the other chips this is a better default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to keep the main PLL running in sleep? I'd like to measure the change in power consumption after this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to measure the change in power consumption after this
Sure - that's very welcome - IIRC it wasn't much difference but I might be wrong. In any case a user can always opt-out (and end up with non-working radio after the light sleep)
| .modify(|_, w| w.wifi_force_pu().clear_bit().wifi_pd_en().set_bit()); | ||
| } else { | ||
| rtc_cntl.dig_pwc().modify(|_, w| w.wifi_pd_en().clear_bit()); | ||
| rtc_cntl.options0().modify(|_, w| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert the base-settings
|
Can we have a QA test for this? I don't agree with these changes but if they work, we need a way to easily see we don't break wifi. |
daf8cef to
fb16204
Compare
This at least partially addresses #3751 (not sure if we should close that and open new issues instead) - might also address #3873 (at least it seems like it does)
ESP32 seems to have a few more problems - e.g. the UART-baudrate is none of the common baud-rates (and definitely not the default 115200) after returning from light-sleep
Testing:
Add this e.g. after
initWith this change WiFi etc. works after a light-sleep w/o powering down the modem (or PLL) - for that I think we probably need to do more (e.g. it seems there are rom functions used as callbacks for enter/exit light-sleep - and more)