projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jtag/cmsis_dap: switch to command 'adapter serial'
[fw/openocd]
/
tcl
/
target
/
stm32l0.cfg
diff --git
a/tcl/target/stm32l0.cfg
b/tcl/target/stm32l0.cfg
index 417b282d3838b1c29a8e2ce5b0a6370812fccac2..7653d13efee9df238476f0a90ae71686b2678a9a 100644
(file)
--- a/
tcl/target/stm32l0.cfg
+++ b/
tcl/target/stm32l0.cfg
@@
-24,9
+24,9
@@
if { [info exists WORKAREASIZE] } {
# JTAG speed should be <= F_CPU/6.
# F_CPU after reset is ~2MHz, so use F_JTAG max = 333kHz
# JTAG speed should be <= F_CPU/6.
# F_CPU after reset is ~2MHz, so use F_JTAG max = 333kHz
-adapter
_khz
300
+adapter
speed
300
-adapter
_nsrst_
delay 100
+adapter
srst
delay 100
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
@@
-37,9
+37,10
@@
if { [info exists CPUTAPID] } {
}
swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
}
swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -endian $_ENDIAN -
chain-position $_TARGETNAME
+target create $_TARGETNAME cortex_m -endian $_ENDIAN -
dap $_CHIPNAME.dap
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
@@
-60,13
+61,16
@@
proc stm32l0_enable_HSI16 {} {
echo "STM32L0: Enabling HSI16"
# Set HSI16ON in RCC_CR (leave MSI enabled)
echo "STM32L0: Enabling HSI16"
# Set HSI16ON in RCC_CR (leave MSI enabled)
- mww 0x40021000 0x00000101
+ mmw 0x40021000 0x00000101 0
# Set HSI16 as SYSCLK (RCC_CFGR)
# Set HSI16 as SYSCLK (RCC_CFGR)
- mww 0x4002100c 0x00000001
+ mmw 0x4002100c 0x00000001 0
+
+ # Wait until System clock switches to HSI16
+ while { ([ mrw 0x4002100c ] & 0x0c) != 0x04 } { }
# Increase speed
# Increase speed
- adapter
_khz
2500
+ adapter
speed
2500
}
$_TARGETNAME configure -event reset-init {
}
$_TARGETNAME configure -event reset-init {
@@
-74,7
+78,7
@@
$_TARGETNAME configure -event reset-init {
}
$_TARGETNAME configure -event reset-start {
}
$_TARGETNAME configure -event reset-start {
- adapter
_khz
300
+ adapter
speed
300
}
$_TARGETNAME configure -event examine-end {
}
$_TARGETNAME configure -event examine-end {