Skip to main content
Graduate
December 10, 2024
Solved

Unable to modify RAM using ST-LINK_CLI.exe

  • December 10, 2024
  • 1 reply
  • 618 views

I'm working with the STM32F407G-DISC1 development board. I would like to change the contents of RAM and hence I type ST-LINK_CLI.exe -w8 0x20000000 0xAB:

ST-LINK_CLI.exe -w8 0x20000000 0xAB
STM32 ST-LINK CLI v3.6.0.0
STM32 ST-LINK Command Line Interface
ST-LINK SN: 0669FF535550755187114222
ST-LINK Firmware version: V2J42M27
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 2.9 V
Connection mode: Normal
Reset mode: Hardware reset
Device ID: 0x413
Device flash Size: 1024 Kbytes
Device family: STM32F405xx/F407xx/F415xx/F417xx
Writing 0xAB at 0x20000000... OK

 However, when I read back from the address, the value has not changed to 0xAB:

ST-LINK_CLI.exe -r8 0x20000000 1
STM32 ST-LINK CLI v3.6.0.0
STM32 ST-LINK Command Line Interface

ST-LINK SN: 0669FF535550755187114222
ST-LINK Firmware version: V2J42M27
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 2.9 V
Connection mode: Normal
Reset mode: Hardware reset
Device ID: 0x413
Device flash Size: 1024 Kbytes
Device family: STM32F405xx/F407xx/F415xx/F417xx

0x20000000 : 00

Does anybody know what I'm doing wrong? The reason I would like to be able to change RAM contents is to execute in a specific test mode during production.

    This topic has been closed for replies.
    Best answer by arnold_w

    Use the HOTPLUG option:

    ST-LINK_CLI.exe -c HOTPLUG -w8 0x20000000 0xAB

    1 reply

    arnold_wAuthorAnswer
    Graduate
    December 10, 2024

    Use the HOTPLUG option:

    ST-LINK_CLI.exe -c HOTPLUG -w8 0x20000000 0xAB