/* timeout happened */
if (tmp->ack != JTAG_ACK_OK_FAULT) {
LOG_ERROR("Timeout during WAIT recovery");
+ dap->select = DP_SELECT_INVALID;
jtag_ap_q_abort(dap, NULL);
+ /* clear the sticky overrun condition */
+ adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
+ DP_CTRL_STAT, DPAP_WRITE,
+ dap->dp_ctrl_stat | SSTICKYORUN, NULL, 0);
retval = ERROR_JTAG_DEVICE_ERROR;
}
}
if (retval == ERROR_OK) {
if (el->ack != JTAG_ACK_OK_FAULT) {
LOG_ERROR("Timeout during WAIT recovery");
+ dap->select = DP_SELECT_INVALID;
jtag_ap_q_abort(dap, NULL);
+ /* clear the sticky overrun condition */
+ adi_jtag_scan_inout_check_u32(dap, JTAG_DP_DPACC,
+ DP_CTRL_STAT, DPAP_WRITE,
+ dap->dp_ctrl_stat | SSTICKYORUN, NULL, 0);
retval = ERROR_JTAG_DEVICE_ERROR;
+ break;
}
} else
break;