From 19667800cb32a032fa58b71daf4d4b3070e64f04 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 31 Jan 2023 17:10:08 +0800 Subject: [PATCH] modify sleep stress test timing now that the initiate suspend call is working right, we need to give a little bit of time for the i2c command to issue to setup the wake alarm before issuing a suspend call. otherwise we end up with a scrambled RTC unit. --- services/shellchat/src/cmds/sleep.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/shellchat/src/cmds/sleep.rs b/services/shellchat/src/cmds/sleep.rs index b18dcb287..2ea43c0d6 100644 --- a/services/shellchat/src/cmds/sleep.rs +++ b/services/shellchat/src/cmds/sleep.rs @@ -92,6 +92,7 @@ impl<'a> ShellCmdApi<'a> for Sleep { loop { log::info!("suspend/resume cycle: {}", iters); llio.set_wakeup_alarm(4).unwrap(); + ticktimer.sleep_ms(1000).unwrap(); match susres.initiate_suspend() { Err(xous::Error::Timeout) => { log::warn!("Couldn't suspend, a server was blocking suspend.\n"); @@ -101,7 +102,7 @@ impl<'a> ShellCmdApi<'a> for Sleep { log::error!("Unknown error on suspend: {:?}", e); } } - ticktimer.sleep_ms(8000).unwrap(); + ticktimer.sleep_ms(7000).unwrap(); iters += 1; } }