This is an automated email from Gerrit.

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

-- gerrit

commit 21734c8a3615ee66c901a0364c32565fb3154bdb
Author: Jonas Norling <[email protected]>
Date:   Wed Oct 25 11:33:06 2017 +0200

    ftdi: Enable SWDIO output before sending data on it
    
    The SWDIO buffer has to be enabled, by setting SWDIO_OE, for data on
    SWDIO to reach the target. Explicitly do this before sending the
    switch sequences for JTAG-to-SWD, etc.
    
    This makes the code insensitive to the state of SWDIO_OE specified in
    ftdi_layout_init. It used to work only on adapters with a non-inverted
    SWDIO_OE inited to 1, or inverted SWDIO_OE inited to 0.
    
    Change-Id: I4b9e520ac1c7ce2a437251a05fc036bc68de718e
    Signed-off-by: Jonas Norling <[email protected]>

diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
index 75a3ce4..32876ba 100644
--- a/src/jtag/drivers/ftdi.c
+++ b/src/jtag/drivers/ftdi.c
@@ -1218,14 +1218,17 @@ static int ftdi_swd_switch_seq(enum swd_special_seq seq)
        switch (seq) {
        case LINE_RESET:
                LOG_DEBUG("SWD line reset");
+               ftdi_swd_swdio_en(true);
                mpsse_clock_data_out(mpsse_ctx, swd_seq_line_reset, 0, 
swd_seq_line_reset_len, SWD_MODE);
                break;
        case JTAG_TO_SWD:
                LOG_DEBUG("JTAG-to-SWD");
+               ftdi_swd_swdio_en(true);
                mpsse_clock_data_out(mpsse_ctx, swd_seq_jtag_to_swd, 0, 
swd_seq_jtag_to_swd_len, SWD_MODE);
                break;
        case SWD_TO_JTAG:
                LOG_DEBUG("SWD-to-JTAG");
+               ftdi_swd_swdio_en(true);
                mpsse_clock_data_out(mpsse_ctx, swd_seq_swd_to_jtag, 0, 
swd_seq_swd_to_jtag_len, SWD_MODE);
                break;
        default:

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to