How to reset my MCU with JLink through the PlatformIO terminal?

Here I have two questions.

  1. I download my code to ST-l476rg via J-Link with SWD , how to make sure my download speed is the most high? I don’t see the flags to set it?

2.I often to reset my MCU without upload the code, but there is no reset button in my board, so I want to reset it in platformioIDE in the terminal, what command should I type in?

Could you slove it in detail, cause I am not smart enough, and from China, not good at English.

Thankyou!

The initial SWD upload speed is hardcoded in the upload logic at

documentation of that parameter is here. Since the docs say ‘initial’ speed it seems that JLink.exe auto adapts after connecting to the chip. I don’t know enough about Jlink.exe here (nor can’t find anything quickly) to confirm that though.

PlatformIO has no built in command for that. But since PIO v5.0 you can add a custom target using python scripting. From the example code you can create a code which starts Jlink.exe with the needed paramters to do a hard- or softreset of the chip.

thank you very much!!!!!