stm8 target: make adapter speed settings work

Previously the adapter speed settings were hard-coded to
connect with low speed then switch over to high speed
regardless what was mentioned in the cfg files. Now the
stm8 target intercept adapter speed settings and configure
the stm8 control registers accordingly.

Change-Id: I7419514e5214e4b43b9d51253cf5b7f04a233533
Signed-off-by: Ake Rehnman <ake.rehnman@gmail.com>
Reviewed-on: http://openocd.zylin.com/5548
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Ake Rehnman
2020-03-29 21:57:53 +02:00
committed by Antonio Borneo
parent 1156fcd79e
commit 2bc24c06d3
3 changed files with 37 additions and 15 deletions

View File

@@ -78,8 +78,10 @@ $_TARGETNAME configure -optionstart $_OPTIONSTART -optionend $_OPTIONEND -blocks
# Set stm8l type
$_TARGETNAME configure -enable_stm8l
# Set low speed at debug entry
adapter speed 363
# Set high speed
adapter speed 800
# Set low speed
#adapter speed 363
reset_config srst_only