This is an automated email from Gerrit. Evan Hunter ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1115
-- gerrit commit 5fe84853547d97ce1cc65a19ef627cc87cfd02f1 Author: Evan Hunter <[email protected]> Date: Thu Jan 17 18:23:55 2013 +0800 Add abort when JTAG-DP transaction times out. Fixes system hang for devices that don't ignore transactions to bad addresses. Change-Id: Ia98344d7efc12951ef79dbc82b8f792b70a22cee Signed-off-by: Evan Hunter <[email protected]> diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 9f37bd5..028247f 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -50,6 +50,8 @@ #define JTAG_ACK_OK_FAULT 0x2 #define JTAG_ACK_WAIT 0x1 +static int jtag_ap_q_abort(struct adiv5_dap *dap, uint8_t *ack); + /*************************************************************************** * * DPACC and APACC scanchain access through JTAG-DP (or SWJ-DP) @@ -235,12 +237,16 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap) while (dap->ack != JTAG_ACK_OK_FAULT) { if (dap->ack == JTAG_ACK_WAIT) { if ((timeval_ms()-then) > 1000) { - /* NOTE: this would be a good spot - * to use JTAG_DP_ABORT. - */ LOG_WARNING("Timeout (1000ms) waiting " "for ACK=OK/FAULT " - "in JTAG-DP transaction"); + "in JTAG-DP transaction - aborting"); + + uint8_t ack; + int abort_ret = jtag_ap_q_abort(dap, &ack); + + if (abort_ret != 0) + LOG_WARNING("Abort failed : return=%d ack=%d", abort_ret, ack); + return ERROR_JTAG_DEVICE_ERROR; } } else { -- ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
