diff options
author | Simon Barner <barner@gmx.de> | 2011-09-16 21:08:10 +0200 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2011-10-08 23:08:46 +0200 |
commit | 8b61ed2e957393cbe1b304ac267937c85e3f2972 (patch) | |
tree | 14c7daa61f7b0a8e1fe0af55cc6456a30718e1d6 | |
parent | 3977c5169b53ae658db143ec95b652fdfbf0aec1 (diff) | |
download | riscv-openocd-8b61ed2e957393cbe1b304ac267937c85e3f2972.zip riscv-openocd-8b61ed2e957393cbe1b304ac267937c85e3f2972.tar.gz riscv-openocd-8b61ed2e957393cbe1b304ac267937c85e3f2972.tar.bz2 |
arm-jtag-ew: Fix setting interface speed (2/2)
Interface expects speed in Hz, not kHz
- Ticket #34
-rw-r--r-- | src/jtag/drivers/arm-jtag-ew.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/drivers/arm-jtag-ew.c b/src/jtag/drivers/arm-jtag-ew.c index f39730f..bf60c77 100644 --- a/src/jtag/drivers/arm-jtag-ew.c +++ b/src/jtag/drivers/arm-jtag-ew.c @@ -184,7 +184,7 @@ static int armjtagew_speed(int speed) usb_out_buffer[0] = CMD_SET_TCK_FREQUENCY; - buf_set_u32(usb_out_buffer + 1, 0, 32, speed); + buf_set_u32(usb_out_buffer + 1, 0, 32, speed*1000); result = armjtagew_usb_message(armjtagew_handle, 5, 4); @@ -196,7 +196,7 @@ static int armjtagew_speed(int speed) usb_out_buffer[0] = CMD_GET_TCK_FREQUENCY; result = armjtagew_usb_message(armjtagew_handle, 1, 4); - speed_real = (int)buf_get_u32(usb_in_buffer,0,32); + speed_real = (int)buf_get_u32(usb_in_buffer,0,32) / 1000; if (result < 0) { LOG_ERROR("ARM-JTAG-EW getting speed failed (%d)", result); |