This is an automated email from Gerrit.

Patrick Stewart (pats...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/2377

-- gerrit

commit 0b63761460da733b1eed9025144ce2be86362f8b
Author: Patrick Stewart <pats...@gmail.com>
Date:   Wed Nov 5 14:53:22 2014 +0000

    FTDI: Make connect_assert_srst work with the FTDI driver
    
    Change-Id: Ieeb75f0924ba6ae69c78f65958e56f754158ae04
    Signed-off-by: Patrick Stewart <pats...@gmail.com>

diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
index 6406406..f6efcc0 100644
--- a/src/jtag/drivers/ftdi.c
+++ b/src/jtag/drivers/ftdi.c
@@ -660,6 +660,19 @@ static int ftdi_initialize(void)
        else
                ftdi_swd_switch_seq(NULL, SWD_TO_JTAG);
 
+       /* support connecting with srst asserted */
+       enum reset_types jtag_reset_config = jtag_get_reset_config();
+       if ((jtag_reset_config & RESET_CNCT_UNDER_SRST) && (jtag_reset_config & 
RESET_SRST_NO_GATING)) {
+               struct signal *srst = find_signal_by_name("nSRST");
+               if (srst)
+                       ftdi_set_signal(srst, '0');
+               else {
+                       LOG_ERROR("Can't assert SRST: nSRST signal is not 
defined");
+                       return ERROR_FAIL;
+               }
+               LOG_INFO("Connecting under reset");
+       }
+
        return mpsse_flush(mpsse_ctx);
 }
 

-- 

------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to