mirror of
git://git.code.sf.net/p/openocd/code
synced 2025-07-24 08:30:58 +10:00
Switch to using the internal HSI when a reset init is called, this also matches the std stm32l cfg. Read (verify) speed is increased from 17 to 120 KiB/s. Change-Id: Ic94ba85949ffdefa17b7be45eef14e30f941d107 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1004 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
36 lines
616 B
INI
36 lines
616 B
INI
#
|
|
# STM32lx stlink pseudo target
|
|
#
|
|
|
|
if { [info exists CHIPNAME] == 0 } {
|
|
set CHIPNAME stm32lx
|
|
}
|
|
|
|
if { [info exists CPUTAPID] == 0 } {
|
|
set CPUTAPID 0x2ba01477
|
|
}
|
|
|
|
if { [info exists WORKAREASIZE] == 0 } {
|
|
set WORKAREASIZE 0x3800
|
|
}
|
|
|
|
source [find target/stm32_stlink.cfg]
|
|
|
|
set _FLASHNAME $_CHIPNAME.flash
|
|
flash bank $_FLASHNAME stm32lx 0 0 0 0 $_TARGETNAME
|
|
|
|
proc stm32l_enable_HSI {} {
|
|
# Enable HSI as clock source
|
|
echo "STM32L: Enabling HSI"
|
|
|
|
# Set HSION in RCC_CR
|
|
mww 0x40023800 0x00000101
|
|
|
|
# Set HSI as SYSCLK
|
|
mww 0x40023808 0x00000001
|
|
}
|
|
|
|
$_TARGETNAME configure -event reset-init {
|
|
stm32l_enable_HSI
|
|
}
|