mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
give a little more margin in sleep stress test to recover/setup/shudown
This commit is contained in:
parent
e1881fa4a2
commit
6a1d8f66f8
1 changed files with 5 additions and 3 deletions
|
|
@ -93,19 +93,21 @@ impl<'a> ShellCmdApi<'a> for Sleep {
|
||||||
let mut timeouts = 0;
|
let mut timeouts = 0;
|
||||||
loop {
|
loop {
|
||||||
log::info!("suspend/resume cycle: {} ({} timeouts)", iters, timeouts);
|
log::info!("suspend/resume cycle: {} ({} timeouts)", iters, timeouts);
|
||||||
llio.set_wakeup_alarm(5).unwrap();
|
llio.set_wakeup_alarm(6).unwrap();
|
||||||
ticktimer.sleep_ms(1000).ok();
|
ticktimer.sleep_ms(2000).ok();
|
||||||
match susres.initiate_suspend() {
|
match susres.initiate_suspend() {
|
||||||
Err(xous::Error::Timeout) => {
|
Err(xous::Error::Timeout) => {
|
||||||
timeouts += 1;
|
timeouts += 1;
|
||||||
log::warn!("Couldn't suspend, a server was blocking suspend. ({}/{})\n", timeouts, iters);
|
log::warn!("Couldn't suspend, a server was blocking suspend. ({}/{})\n", timeouts, iters);
|
||||||
|
// wait enough time for the wakeup alarm to have happened before resuming the cycle
|
||||||
|
ticktimer.sleep_ms(6000).unwrap();
|
||||||
}
|
}
|
||||||
Ok(_) => {},
|
Ok(_) => {},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("Unknown error on suspend: {:?}", e);
|
log::error!("Unknown error on suspend: {:?}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ticktimer.sleep_ms(3000 + (trng.get_u32().unwrap() % 7000) as usize).unwrap();
|
ticktimer.sleep_ms(4000 + (trng.get_u32().unwrap() % 7000) as usize).unwrap();
|
||||||
iters += 1;
|
iters += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue