Browse Source

dap: Allow to recover from protocoll errors #1105

Signal all communication problems with an existing target as a fault, not
only a missing acknowledge.
Tested with picoprobe against another Pico and code that casual injected
errors, '9' as in #1105 and '2' for wait.
pull/1122/head
Uwe Bonnes 2 years ago
parent
commit
20a6a8c25b
  1. 2
      src/platforms/hosted/dap.c

2
src/platforms/hosted/dap.c

@ -333,7 +333,7 @@ static uint32_t wait_word(uint8_t *buf, int size, int len, uint8_t *dp_fault)
break;
} while (buf[1] == DAP_TRANSFER_WAIT);
if(buf[1] == SWDP_ACK_FAULT) {
if (buf[1] != DAP_TRANSFER_OK && buf[1] != DAP_TRANSFER_NO_TARGET) {
*dp_fault = 1;
return 0;
}

Loading…
Cancel
Save