From: Angus Gratton Date: Sat, 19 Jul 2014 08:50:55 +0000 (+1000) Subject: jtag/drivers/ftdi: Use adapter_khz value for initial clock speed (was default 1kHz) X-Git-Tag: v0.9.0-rc1~297 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d50cc1bfea61b161deca9af20d6871dc53bca93b;p=openocd jtag/drivers/ftdi: Use adapter_khz value for initial clock speed (was default 1kHz) nrf51822 doesn't like a 1kHz initial clock rate, puts the DAP into a bad state. Mailing list discussion thread: http://sourceforge.net/p/openocd/mailman/openocd-devel/thread/20140718081528.GA5554%40ex2.lan/#msg32621853 Change-Id: I71aa75505cc1b41ee80c7b9db415f6ac738c2916 Signed-off-by: Angus Gratton Reviewed-on: http://openocd.zylin.com/2223 Tested-by: jenkins Reviewed-by: Andreas Fritiofson --- diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c index 0debc2dc..6406406a 100644 --- a/src/jtag/drivers/ftdi.c +++ b/src/jtag/drivers/ftdi.c @@ -653,8 +653,7 @@ static int ftdi_initialize(void) mpsse_loopback_config(mpsse_ctx, false); - /* Set a low default */ - freq = mpsse_set_frequency(mpsse_ctx, 1000); + freq = mpsse_set_frequency(mpsse_ctx, jtag_get_speed_khz() * 1000); if (swd_mode) ftdi_swd_switch_seq(NULL, JTAG_TO_SWD);