This is an automated email from Gerrit.

Fredrik Hederstierna ([email protected]) just uploaded a new patch set 
to Gerrit, which you can find at http://openocd.zylin.com/3018

-- gerrit

commit 4a79588667cb7211a6957480612006a4d2e897eb
Author: Fredrik Hederstierna <[email protected]>
Date:   Thu Oct 15 06:49:58 2015 +0200

    topic: Add support for connect_assert_srst for SWD.
    
    Today the reset option for connect_assert_srst is not done for SWD.
    This patch adds this to SWD and make it possible to connect to targets 
which might disable JTAG interface when running.
    
    Change-Id: Ib89f7cf59b628e8f0b5fca9dd9e362e383c4b99f
    Signed-off-by: Fredrik Hederstierna <[email protected]>

diff --git a/src/target/adi_v5_swd.c b/src/target/adi_v5_swd.c
index 2cb61f8..320cc66 100644
--- a/src/target/adi_v5_swd.c
+++ b/src/target/adi_v5_swd.c
@@ -109,6 +109,16 @@ static int swd_connect(struct adiv5_dap *dap)
         * MUST READ IDCODE
         */
 
+       /* Check if we should reset srst already when connecting. */
+       enum reset_types jtag_reset_config = jtag_get_reset_config();
+
+       if (jtag_reset_config & RESET_CNCT_UNDER_SRST) {
+               if (jtag_reset_config & RESET_SRST_NO_GATING)
+                       swd_add_reset(1);
+               else
+                       LOG_WARNING("\'srst_nogate\' reset_config option is 
required");
+       }
+
        /* Note, debugport_init() does setup too */
        jtag_interface->swd->switch_seq(dap, JTAG_TO_SWD);
 

-- 

------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to