diff options
author | Elias Naur <[email protected]> | 2024-03-09 11:41:45 +0000 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-04-27 13:02:20 +0200 |
commit | 2b3b870bfe63ab0b8e866df3ceef9e0c8a6e6c56 (patch) | |
tree | bb12377a5d3863c807bc8d8e9acf82645dbc7da6 | |
parent | 7748c4922e426798ebb878eb48ba0d2d0dc0db09 (diff) | |
download | tinygo-2b3b870bfe63ab0b8e866df3ceef9e0c8a6e6c56.tar.gz tinygo-2b3b870bfe63ab0b8e866df3ceef9e0c8a6e6c56.zip |
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.
-rw-r--r-- | targets/mksnanov3.json | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/targets/mksnanov3.json b/targets/mksnanov3.json index 9b202d3ab..fc57a71d9 100644 --- a/targets/mksnanov3.json +++ b/targets/mksnanov3.json @@ -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 }"] } |