Skip to main content
Visitor II
June 25, 2021
Question

ST Link CLI

  • June 25, 2021
  • 1 reply
  • 1015 views

I am using the ST-Link CLI tool in windows.

I am able to progam a virgin unit and after a power cycle the correct software is running

However a need to make a testjig setup. The unit is powered by USB so after programming I need to reset the unit to run the newly programmed firmware. However the -RST -HARDRST does not execute the software

ST-LINK_CLI.exe -c SWD HOTPLUG freq=4000 -P app.srec

ST-LINK_CLI.exe -c SWD HOTPLUG freq=4000 -RST

ST-LINK_CLI.exe -c SWD HOTPLUG freq=4000 -RUN

This does run the software (Sortof) but I have code in my app the also do a software reset (This works in all other cases)

However if I issue my Software reset of ST-LINK_CLI.exe -c SWD HOTPLUG freq=4000 -RST the app returns to an unkown state (Similar to virgin state)

    This topic has been closed for replies.

    1 reply

    Super User
    June 25, 2021

    > This does run the software (Sortof) but I have code in my app the also do a software reset

    So your code is running but you need to do another reset? Why? What does "works" and "doesn't work" mean specifically?

    LHoug.1Author
    Visitor II
    June 25, 2021

    I get comms via usb uart. And can send commands via our api. Comms with adc etc works. ​

    What does not work: I have a config area setup in flash. This is not accessable. Also we can also program the unit using usb and need to verify that this is successfull. Is seems like flash is locked in this mode. I am just mentioning the reset via comms api to say that this reset works correctly after power cycle. But not for the first run after cli programming

    ​ My question is what is -RST supposed to do as it does not seem to reset the unit