fix termination condition detection error

This commit is contained in:
bunnie 2022-01-31 12:40:26 +08:00
parent 7999ea04d1
commit 2a1ab53e6b

View file

@ -675,7 +675,7 @@ fn xmain() -> ! {
loop {
com.txrx(ComState::LOOP_TEST.verb);
let ack = com.wait_txrx(ComState::LINK_READ.verb, Some(5000)); // should finish with 5 seconds
if (ack & 0xff) != 0x01 {
if (ack & 0xff) != 0x00 { //it will read 0xdd or 0xff if the EC is actually still in reset or held up
log::warn!("Wf200 reset took too long, trying to re-establish link sync...{:x}", ack);
com.txrx(ComState::LINK_SYNC.verb);
ticktimer.sleep_ms(200).unwrap();