mksnanov3: limit programming speed to 1800 kHz

Both of my development boards exhibit stability problems when
programming at the default 4000 kHz speed of the target/stmf32d4x
OpenOCD configuration.

Note that the speed limit must be set by an event handler, because it
is hard-coded by a similar event handler in stmf32f4x.cfg:

  $_TARGETNAME configure -event reset-init {
  	# Configure PLL to boost clock to HSI x 4 (64 MHz)
    ...

  	# Boost JTAG frequency
  	adapter speed 8000     <-- resolves to 4000 kHz by the SWD interface
  }

While here, replace the reference to the deprecated "stlink-v2"
configuration.
This commit is contained in:
Elias Naur
2024-03-09 11:41:45 +00:00
committed by Ron Evans
parent 7748c4922e
commit 2b3b870bfe
+3 -2
View File
@@ -7,6 +7,7 @@
"src/device/stm32/stm32f407.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink-v2",
"openocd-target": "stm32f4x"
"openocd-interface": "stlink",
"openocd-target": "stm32f4x",
"openocd-commands": ["stm32f4x.cpu configure -event reset-init { adapter speed 1800 }"]
}