]> git.sur5r.net Git - openocd/commitdiff
halting srst_pulls_trst targets is now snappier and has explicit warning.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 5 Aug 2008 10:50:10 +0000 (10:50 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 5 Aug 2008 10:50:10 +0000 (10:50 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@889 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/arm7_9_common.c

index 547bf3c490bac69fda56309b290ff433abc150be..73ee849063ce9bbe4be9f444ef755f03cd25f03f 100644 (file)
@@ -835,9 +835,21 @@ int arm7_9_deassert_reset(target_t *target)
 
        if ((jtag_reset_config & RESET_SRST_PULLS_TRST)!=0)
        {
+               LOG_WARNING("srst pulls trst - can not reset into halted mode. Issuing halt after reset.");
                /* set up embedded ice registers again */
                if ((retval=target->type->examine(target))!=ERROR_OK)
                        return retval;
+
+               if ((retval=target_poll(target))!=ERROR_OK)
+               {
+                       return retval;
+               }
+               
+               if ((retval=target_halt(target))!=ERROR_OK)
+               {
+                       return retval;
+               }
+               
        }
        return retval;
 }