From d8065b76dfc0a43293b6956bed426b5c8e5f60cd Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 30 Mar 2022 02:27:14 +0800 Subject: [PATCH] turn off RTC wakeup alarms This call was originally part of the RTC driver, but when we refactored things out, this was forgotten. So, what would happen is, if you did a coldboot or reboot, an alarm would get set and...well, the way the RTC blocks is it'll keep asserting the alarm until you clear it. This prevents the system from sleeping, and also keeps the CPU pegged at 100% for some reason. The prevention from sleeping makes sense to me. The CPU at 100% probably indicates there's a problem in the event router, but this path isn't used for anything at the moment so we'll just open an issue and leave it as technical debt. --- services/status/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/services/status/src/main.rs b/services/status/src/main.rs index ba0d92e72..9f9d195fd 100644 --- a/services/status/src/main.rs +++ b/services/status/src/main.rs @@ -358,6 +358,7 @@ fn xmain() -> ! { } }); log::info!("|status: starting main loop"); // don't change this -- factory test looks for this exact string + llio.clear_wakeup_alarm().unwrap(); // this is here to clear any wake-up alarms that were set by a prior coldboot command pump_run.store(true, Ordering::Relaxed); // start status thread updating loop { let msg = xous::receive_message(status_sid).unwrap();