Skip to main content
Visitor II
July 11, 2024
Solved

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

  • July 11, 2024
  • 4 replies
  • 2881 views

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?

 

 

    This topic has been closed for replies.
    Best answer by TDK

    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.

    4 replies

    TDKAnswer
    Super User
    July 11, 2024

    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.

    dplogiicAuthor
    Visitor II
    July 16, 2024

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

    Super User
    July 16, 2024

    Disconnect, then connect, then disconnect again.

    dplogiicAuthor
    Visitor II
    July 19, 2024

    @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.