fix: prevent idle freeze by hardening NTP and clock power management

BootNtpSync now acquires a HalPowerManager::Lock for the entire WiFi/NTP
task lifecycle, keeping the CPU at full speed during scan, connect, sync,
and teardown. The clock refresh logic in the main loop now explicitly
restores CPU frequency and resets the activity timer before requesting a
render, preventing display SPI operations from running at 10 MHz.

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-09 05:19:48 -04:00
parent 4851016c47
commit 6cf212d12a
3 changed files with 34 additions and 0 deletions

View File

@@ -416,9 +416,13 @@ void loop() {
if (lastRenderedMinute < 0) {
lastRenderedMinute = currentMinute;
if (sawInvalidTime) {
lastActivityTime = millis();
powerManager.setPowerSaving(false);
activityManager.requestUpdate();
}
} else if (currentMinute != lastRenderedMinute) {
lastActivityTime = millis();
powerManager.setPowerSaving(false);
activityManager.requestUpdate();
lastRenderedMinute = currentMinute;
}