X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fao_cmd.c;h=8037195a13f12264af41866ce1671e8982cb1e84;hb=fba1d605a627d03f9587ec060c45fb5d3e96aaeb;hp=1442ebea8eafc9a32e31ae18006bf61ef2af9316;hpb=fc4173ff882dd9718f34ed043276ef612783dfe0;p=fw%2Faltos diff --git a/src/ao_cmd.c b/src/ao_cmd.c index 1442ebea..8037195a 100644 --- a/src/ao_cmd.c +++ b/src/ao_cmd.c @@ -208,6 +208,13 @@ ao_reboot(void) ao_cmd_white(); if (!ao_match_word("eboot")) return; + + /* Delay waiting for the packet master to be turned off + * so that we don't end up back in idle mode because we + * received a packet after boot. + */ + flush(); + ao_delay(AO_SEC_TO_TICKS(1)); WDCTL = WDCTL_EN | WDCTL_MODE_WATCHDOG | WDCTL_INT_64; ao_delay(AO_SEC_TO_TICKS(2)); ao_panic(AO_PANIC_REBOOT);