esp_hw_support: sleep: honor the rtc wdt pause-in-sleep setting #691
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.32) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 121 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.287
Real PR Conversation Timeline
1 comments
"Review active on #691"
general
weight: 0.35
marekmatej
Light sleep always paused the RTC watchdog, even when the application armed it with its pause-in-sleep bit cleared. On ESP32, ESP32-S2, ESP32-S3, ESP32-C2 and ESP32-C3, rtc_sleep_init() sets that bit again on every sleep entry. On the PMU-based SoCs, the PMU holds the LP watchdog through dig_pause_wdt unless RTC_SLEEP_USE_RTC_WDT is set. As a result, a watchdog meant to catch a sleep that never wakes, or a hang in a mostly idle system, never fires.
This adds rwdt_ll_get_pause_in_sleep_en() for every SoC with an RTC watchdog. get_sleep_flags() now requests RTC_SLEEP_USE_RTC_WDT when the RWDT is enabled with that bit cleared, so the application's setting is kept. A watchdog set to pause, and the sleep safety net, behave as before. The "RTC WDT is enabled" message also moves to debug level, because with power management it was printed on every light sleep while the RWDT was armed. The Zephyr RTC watchdog driver needs this to support WDT_OPT_PAUSE_IN_SLEEP.