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.
This commit is contained in:
bunnie 2023-01-31 17:10:08 +08:00
parent b75e048702
commit 19667800cb

View file

@ -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;
}
}