cancel
Showing results for 
Search instead for 
Did you mean: 

Switch Between DFU and User Application in Software (NO Physical Interaction)?

dplogiic
Associate II

Hello team,

I’m working with an STM32H745iik6/ Nucleo-H745ziq microcontroller and currently using USB DFU mode to upload firmware. The process involves setting BOOT0 to 1 and performing a manual reset to enter DFU mode. After uploading the new firmware, I manually set BOOT0 back to 0 and reset the board again to run the user application.

otherwise any ST software like stm32cubepgm to select DFU mode or user_apllication mode?

Current Approach:

  1. Enter DFU Mode:
    • Set BOOT0 to 1.
    • Perform a manual reset.
  2. Upload Firmware via USB DFU.
  3. Run User Application:
    • Set BOOT0 to 0.
    • Perform another manual reset.

Goal:

I want to automate this process entirely through software without the need for physical interaction. Specifically, I’m looking for a way to:

  1. Switch to DFU mode using software.
  2. Upload new firmware.
  3. Automatically return to the user application after the firmware upload.
  • Is it possible to switch between DFU mode and the user application purely through software on STM32 microcontrollers?
  • If so, can someone provide an example or detailed steps on how to achieve this?
  • What are the best practices to ensure a smooth transition between DFU mode and the user application without manual intervention?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Jumping to the bootloader from the application can be done, see this page for reference.

How to jump to system bootloader from application ... - STMicroelectronics Community

 

To get back to the application, you can use the GO instruction, or reset the chip (remotely) using STM32CubeProgrammer.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Guru

Jumping to the bootloader from the application can be done, see this page for reference.

How to jump to system bootloader from application ... - STMicroelectronics Community

 

To get back to the application, you can use the GO instruction, or reset the chip (remotely) using STM32CubeProgrammer.

If you feel a post has answered your question, please click "Accept as Solution".
dplogiic
Associate II

Thanks @TDKfor support. please can you help how to reset using stm32cubepgm after upload code? 

TDK
Guru

Disconnect, then connect, then disconnect again.

If you feel a post has answered your question, please click "Accept as Solution".
dplogiic
Associate II

@TDK I trying as you suggest Disconnect, then connect but not work. we need to Power OFF and ON or reset manually.   This is work in case of STLINK connected.  but i want to with DFU.