#1009
Dabao might not be entering deep sleep
Sample code that is likely wrong:
set_phase(&iox, PHASE_DEEP);
log::info!("deep sleep for {} s", PHASE_SECS);
set_warm_boot(&keystore, true);
rtc.set_wakeup(Utc::now() + chrono::Duration::seconds(PHASE_SECS)).ok();
xous::send_message(
susres_conn,
xous::Message::new_scalar(
susres::api::Opcode::PlatformSpecific.to_usize().unwrap(),
ClockOp::DeepSleep.to_usize().unwrap(),
0,
0,
0,
),
)
.ok();
// deep sleep powers the core down and its RTC wake is a fresh boot, so getting here
// means it didn't happen; idle out the phase and carry on
tt.sleep_ms(PHASE_SECS as usize * 1000).ok();
log::error!("deep sleep didn't happen; continuing the cycle");
rtc.clear_wakeup();
set_warm_boot(&keystore, false);
marker_blink(&iox, &tt);This specific code, based on CSV power logs gathered with an INA228 board from adafruit, suggest the dabao board might not be getting into proper deep-sleep, or that there might be board-level power usage that can't be fully mitigated.
Logs:
I do not claim these logs are fully correct, nor that the code I'm using is fully correct, but the breadboard itself isn't able to drive the deep sleep power any lower.