cancel
Showing results for 
Search instead for 
Did you mean: 

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

Sofiane
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.


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.

View solution in original post

5 REPLIES 5
STea
ST Employee

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.

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

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.


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.

Hi @Maryem ,

So i will find another way around for this matter then.

Thank you 

If you can push in code into RAM, and jump to it, you could use NVIC_SystemReset() or equivalent. Or watchdog

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..