aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/swim.h
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2020-02-04 11:07:01 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2020-05-24 21:31:21 +0100
commitac05f929edffd6f1a4491d0b1e6cc95122ec6eb1 (patch)
tree8ef12de202276c0cb2c756e84673f1a57b8fe47e /src/jtag/swim.h
parentac18e960ce79f06b22e71a17415be0feb741a482 (diff)
downloadriscv-openocd-ac05f929edffd6f1a4491d0b1e6cc95122ec6eb1.zip
riscv-openocd-ac05f929edffd6f1a4491d0b1e6cc95122ec6eb1.tar.gz
riscv-openocd-ac05f929edffd6f1a4491d0b1e6cc95122ec6eb1.tar.bz2
swim: fix adapter speed handling
SWIM transport only supports two adapter speeds: - "low speed" equal to 363 kHz (8 MHz / 22) - "high speed" equal to 800 kHz (8 MHz / 10) Replace the previous convention that use "0" or "1" for "low" or "high" speed with the effective speed in kHz. Rework the implementation of stlink_speed_swim(). Set low speed in the stm8 config files, because only low speed is permitted at debug connection; the previous code ignores the initial value. Change-Id: I2484c9419a2c554c59eb6b9216339393ab0b54f3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5529 Tested-by: jenkins
Diffstat (limited to 'src/jtag/swim.h')
-rw-r--r--src/jtag/swim.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jtag/swim.h b/src/jtag/swim.h
index d0ae18e..186e0cc 100644
--- a/src/jtag/swim.h
+++ b/src/jtag/swim.h
@@ -13,6 +13,9 @@
#ifndef OPENOCD_JTAG_SWIM_H
#define OPENOCD_JTAG_SWIM_H
+#define SWIM_FREQ_LOW 363
+#define SWIM_FREQ_HIGH 800
+
struct swim_driver {
/**
* Send SRST (system reset) command to target.