2022-08-30 12:44 AM
Hi,
I am using ST-LINK_CLI for flashing mcu via ST-Link ->SWD. In ST-Link utility can be set Reset mode (SW,HW,Core). How can I set this parameter in ST-Link_CLI ? I did not find anything in documentation.
Or is there any better tool to control STLink via command line? Actually I use it to control it from python...
Thank you, Jan.
Solved! Go to Solution.
2022-09-02 01:57 AM
Programmer_CLI resolved all my problems. Do not why, but with STUtiity (Link_CLI) the connection was not reliable.
2022-08-30 01:06 AM
Hello @Community member ,
When you launch ST-Link_CLI the help is displayed.
You can set the port and the reset mode by command line.
There is 2 or 3 examples available.
The syntax is:
-c [ID=<id>/SN=<sn>] [JTAG/SWD SWCLK=<f>] [UR/HOTPLUG] [LPM] [RM=Hrst/Srst/Crst]
Regards
Michael
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-08-30 01:10 AM
Thanks! It looks like what I was looking for. "Srst" param is probably what I have to use whe connecting to device..
2022-08-30 03:41 AM
2022-09-01 12:24 AM
So I replaced Link_CLI by Programmer_CLI. Unfortunatelly sometimes (probably when some connections errors occurs) the commands do not answer - it stays stuck. e.g. whe everything works fine the command "STM32_Programmer_CLI.exe -l" takes few ms, but when it stucks it can take several seconds.
Is that normal? Is there any easy workaround or it is upt o my python program to handle these stucks?
Thanks!
2022-09-02 01:55 AM
I solved it by killing the subproces when it takes more then my timeout value
2022-09-02 01:57 AM
Programmer_CLI resolved all my problems. Do not why, but with STUtiity (Link_CLI) the connection was not reliable.