mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +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();
|
let trng = trng::Trng::new(&xns).unwrap();
|
||||||
ticktimer.sleep_ms(1500).unwrap();
|
ticktimer.sleep_ms(1500).unwrap();
|
||||||
let mut iters = 0;
|
let mut iters = 0;
|
||||||
|
let mut timeouts = 0;
|
||||||
loop {
|
loop {
|
||||||
log::info!("suspend/resume cycle: {}", iters);
|
log::info!("suspend/resume cycle: {} ({} timeouts)", iters, timeouts);
|
||||||
llio.set_wakeup_alarm(4).unwrap();
|
llio.set_wakeup_alarm(5).unwrap();
|
||||||
ticktimer.sleep_ms(1000).ok();
|
ticktimer.sleep_ms(1000).ok();
|
||||||
match susres.initiate_suspend() {
|
match susres.initiate_suspend() {
|
||||||
Err(xous::Error::Timeout) => {
|
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(_) => {},
|
Ok(_) => {},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue