timeout is now 1000ms instead of trying 100 times.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1015 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
316c9b9698
commit
4eda44db36
|
@ -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 swjdp_transaction_endcheck(swjdp_common_t *swjdp)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
int waitcount = 0;
|
|
||||||
u32 ctrlstat;
|
u32 ctrlstat;
|
||||||
|
|
||||||
keep_alive();
|
keep_alive();
|
||||||
|
@ -199,14 +198,14 @@ int swjdp_transaction_endcheck(swjdp_common_t *swjdp)
|
||||||
|
|
||||||
swjdp->ack = swjdp->ack & 0x7;
|
swjdp->ack = swjdp->ack & 0x7;
|
||||||
|
|
||||||
|
long long then=timeval_ms();
|
||||||
while (swjdp->ack != 2)
|
while (swjdp->ack != 2)
|
||||||
{
|
{
|
||||||
if (swjdp->ack == 1)
|
if (swjdp->ack == 1)
|
||||||
{
|
{
|
||||||
waitcount++;
|
if ((timeval_ms()-then) > 1000)
|
||||||
if (waitcount > 100)
|
|
||||||
{
|
{
|
||||||
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;
|
return ERROR_JTAG_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue