mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
track failed suspend attempts
This commit is contained in:
parent
b9ab411e33
commit
5fabcd2ca7
1 changed files with 5 additions and 3 deletions
|
|
@ -90,13 +90,15 @@ impl<'a> ShellCmdApi<'a> for Sleep {
|
|||
let trng = trng::Trng::new(&xns).unwrap();
|
||||
ticktimer.sleep_ms(1500).unwrap();
|
||||
let mut iters = 0;
|
||||
let mut timeouts = 0;
|
||||
loop {
|
||||
log::info!("suspend/resume cycle: {}", iters);
|
||||
llio.set_wakeup_alarm(4).unwrap();
|
||||
log::info!("suspend/resume cycle: {} ({} timeouts)", iters, timeouts);
|
||||
llio.set_wakeup_alarm(5).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");
|
||||
timeouts += 1;
|
||||
log::warn!("Couldn't suspend, a server was blocking suspend. ({}/{})\n", timeouts, iters);
|
||||
}
|
||||
Ok(_) => {},
|
||||
Err(e) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue