diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-04 07:56:13 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-04 07:56:13 +0000 |
commit | 4eda44db36cf973a440bc02cf72610ad2b7d828b (patch) | |
tree | 826248d14924300e1e7c1f7565c4931297c84898 | |
parent | 316c9b969861be8485ca1ba1bc89ec8fbf4a07a9 (diff) | |
download | riscv-openocd-4eda44db36cf973a440bc02cf72610ad2b7d828b.zip riscv-openocd-4eda44db36cf973a440bc02cf72610ad2b7d828b.tar.gz riscv-openocd-4eda44db36cf973a440bc02cf72610ad2b7d828b.tar.bz2 |
timeout is now 1000ms instead of trying 100 times.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1015 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/target/cortex_swjdp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/target/cortex_swjdp.c b/src/target/cortex_swjdp.c index 91367fc..e368cfd 100644 --- a/src/target/cortex_swjdp.c +++ b/src/target/cortex_swjdp.c @@ -175,7 +175,6 @@ int scan_inout_check_u32(swjdp_common_t *swjdp, u8 instr, u8 reg_addr, u8 RnW, u int swjdp_transaction_endcheck(swjdp_common_t *swjdp) { int retval; - int waitcount = 0; u32 ctrlstat; keep_alive(); @@ -199,14 +198,14 @@ int swjdp_transaction_endcheck(swjdp_common_t *swjdp) swjdp->ack = swjdp->ack & 0x7; + long long then=timeval_ms(); while (swjdp->ack != 2) { if (swjdp->ack == 1) { - waitcount++; - if (waitcount > 100) + if ((timeval_ms()-then) > 1000) { - LOG_WARNING("Timeout waiting for ACK = OK/FAULT in SWJDP transaction"); + LOG_WARNING("Timeout (1000ms) waiting for ACK = OK/FAULT in SWJDP transaction"); return ERROR_JTAG_DEVICE_ERROR; } } |