diff --git a/services/llio/src/main.rs b/services/llio/src/main.rs index 1cde0f1b5..3a540649e 100644 --- a/services/llio/src/main.rs +++ b/services/llio/src/main.rs @@ -425,8 +425,6 @@ fn main() -> ! { } let seconds = delay as u8; i2c.i2c_mutex_acquire(); - // make sure battery switchover is enabled, otherwise we won't keep time when power goes off - // i2c.i2c_write(ABRTCMC_I2C_ADR, ABRTCMC_CONTROL3, &[RTC_PWR_MODE]).expect("RTC access error"); // set clock units to 1 second, output pulse length to ~218ms i2c.i2c_write(ABRTCMC_I2C_ADR, ABRTCMC_TIMERB_CLK, &[(TimerClk::CLK_1_S | TimerClk::PULSE_218_MS).bits()]).expect("RTC access error"); // program elapsed time @@ -449,8 +447,6 @@ fn main() -> ! { }), Some(Opcode::ClearWakeupAlarm) => msg_blocking_scalar_unpack!(msg, _, _, _, _, { i2c.i2c_mutex_acquire(); - // make sure battery switchover is enabled, otherwise we won't keep time when power goes off - // i2c.i2c_write(ABRTCMC_I2C_ADR, ABRTCMC_CONTROL3, &[RTC_PWR_MODE]).expect("RTC access error"); let config = Config::CLKOUT_DISABLE.bits(); // turn off RTC wakeup timer, in case previously set i2c.i2c_write(ABRTCMC_I2C_ADR, ABRTCMC_CONFIG, &[config]).expect("RTC access error"); diff --git a/services/shellchat/src/cmds/sleep.rs b/services/shellchat/src/cmds/sleep.rs index 0afa55366..c64fc3b52 100644 --- a/services/shellchat/src/cmds/sleep.rs +++ b/services/shellchat/src/cmds/sleep.rs @@ -93,6 +93,7 @@ impl<'a> ShellCmdApi<'a> for Sleep { loop { log::info!("suspend/resume cycle: {}", iters); llio.set_wakeup_alarm(4).unwrap(); + ticktimer.sleep_ms(1000).ok(); match susres.initiate_suspend() { Err(xous::Error::Timeout) => { log::warn!("Couldn't suspend, a server was blocking suspend.\n");