Skip to main content
Associate II
November 2, 2023
Solved

How to reboot a device using CubeProgrammer_API.dll and USB Bootloader interface ?

  • November 2, 2023
  • 1 reply
  • 2625 views

Hi,

I probably didn't search correctly in the documentation, but i didn't find a command to reboot the device using the USB Bootloader interface . I found a reset method but its with STLINK and its not what i'm using.

Is there any method available ?

thank you for all the help you can provide 

Sofiane

Best answer by Maryem

Hello @Sofiane,

The function call corresponding to the "-rst" command is "reset(SOFTWARE_RESET)". However, as you said, this function is only available for the JTAG/SWD debug interface and cannot be used with the bootloader interfaces.

As a result, resetting the device through the USB bootloader interface is not possible with STM32CubeProgrammer APIs.

Maryem.

1 reply

ST Employee
November 3, 2023

Hello @Sofiane,

"I found a reset method but its with STLINK and its not what i'm using."

referring to the STM32CubeProgrammer  User manual Figure 112. STM32CubeProgrammer: available commands

You can add the option  -rst in the command which is not specific to JTAG/SWD debug port as show in the screenshot bellow .

STea_0-1699009935068.png

please let me know if this solved your issue .

BR Hichem

In order 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.
SofianeAuthor
Associate II
November 3, 2023

Hello @STea ,

thank you for your answer.

unfortunatly, i'm not using the command line tool provided by STM . i'm using the CubeProgrammer_API.dll in one of my C++ project. and when i try to call reset(SOFTWARE_RESET) or reset(HARDWARE_RESET) , i get and exception : Access violation reading location 0x00000000000000F0. 

So i'm guessing that the command cannot be called from my program as i'm doing it. 

what would be the corresponding C++ call for this --rst option command when you are using the USB interface to deal with a device ?

Again thank you for your help

Robmar
Senior II
May 21, 2025

Hi, did you find a solution?