]> git.sur5r.net Git - openocd/commitdiff
switch to alive_sleep() to avoid gdb timeouts
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 19 Aug 2008 16:43:30 +0000 (16:43 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 19 Aug 2008 16:43:30 +0000 (16:43 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@945 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/cortex_m3.c
src/target/cortex_swjdp.c

index 9e0916ff3ad49856e21647a1bae0a1e514ec08ca..12574c66af757f8ab0f4fbd57f9d872cba5ef891 100644 (file)
@@ -523,7 +523,7 @@ int cortex_m3_soft_reset_halt(struct target_s *target)
                                LOG_DEBUG("waiting for system reset-halt, dcb_dhcsr 0x%x, %i ms", dcb_dhcsr, timeout);
                }
                timeout++;
-               usleep(1000);
+               alive_sleep(1);
        }
                
        return ERROR_OK;
index dc50fea1c4a91ff18b64bb8c5f1d5338db447ee9..a4a997b8c8008a7c5bd400e3acf9381f37a76c53 100644 (file)
@@ -966,7 +966,7 @@ int ahbap_debugport_init(swjdp_common_t *swjdp)
                swjdp_read_dpacc(swjdp, &ctrlstat, DP_CTRL_STAT);
                if ((retval=jtag_execute_queue())!=ERROR_OK)
                        return retval;
-               usleep(10000);
+               alive_sleep(10);
        }
 
        while (!(ctrlstat & CSYSPWRUPACK) && (cnt++ < 10))
@@ -975,7 +975,7 @@ int ahbap_debugport_init(swjdp_common_t *swjdp)
                swjdp_read_dpacc(swjdp, &ctrlstat, DP_CTRL_STAT);
                if ((retval=jtag_execute_queue())!=ERROR_OK)
                        return retval;
-               usleep(10000);
+               alive_sleep(10);
        }
 
        swjdp_read_dpacc(swjdp, &dummy, DP_CTRL_STAT);