This is an automated email from Gerrit.

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

-- gerrit

commit 4f3275a9f2edbfffd5248f701abe193d1b16fd75
Author: Tomas Vanek <[email protected]>
Date:   Mon Jan 9 15:30:21 2017 +0100

    jtag/drivers cmsis-dap: fix speed setting on Atmel EDBG
    
    Without the change Atmel EDBG uses default clock freq about 168 kHz
    instead adapter_khz configured before interface init.
    Changing adapter speed after init works as expected.
    
    Testing shows the EDBG firmware resets speed to default during 
DAP_SWJ_Sequence.
    Tested with fw versions 03.1F.01AE and 02.09.0169
    
    This change repeats the DAP_SWJ_Clock command after sending a SWJ sequence.
    
    Change-Id: Ic70457c5df635f47cad5e70b0dc83a083ea1b3a3
    Reported-by: Ladislav Laska <[email protected]>
    Signed-off-by: Tomas Vanek <[email protected]>

diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c
index dd37522..cffd5e7 100644
--- a/src/jtag/drivers/cmsis_dap_usb.c
+++ b/src/jtag/drivers/cmsis_dap_usb.c
@@ -821,7 +821,13 @@ static int cmsis_dap_swd_switch_seq(enum swd_special_seq 
seq)
                return ERROR_FAIL;
        }
 
-       return cmsis_dap_cmd_DAP_SWJ_Sequence(s_len, s);
+       retval = cmsis_dap_cmd_DAP_SWJ_Sequence(s_len, s);
+       if (retval != ERROR_OK)
+               return retval;
+
+       /* Atmel EDBG needs renew clock setting after SWJ_Sequence
+        * otherwise default frequency is used */
+       return cmsis_dap_cmd_DAP_SWJ_Clock(jtag_get_speed_khz());
 }
 
 static int cmsis_dap_swd_open(void)

-- 

------------------------------------------------------------------------------
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