Skip to main content
Explorer
January 21, 2022
Solved

How to flash STM32 MCU using USB

  • January 21, 2022
  • 1 reply
  • 19619 views

Using IAR to develop software for and burn flash via USB on STM32 7B3I and Discovery eval boards.

Need to develop my own Windows software to burn flash via USB on our own product.

Am familiar with AN2606 [bootloader] and AN3156 [DFU] but neither appear to document how to use host USB to burn client flash.

Can anyone point to a relevant document?

    This topic has been closed for replies.
    Best answer by MM..1

    Ahhh stop your waste time with this USB idea. DFU Driver is part of instalation STM_Programmer from my first post.

    When you plan use discovery boards skip trying DFU and use STLINK to every board.

    1 reply

    Graduate II
    January 22, 2022

    If you set properly board to DFU mode then

    STM32_Programmer_CLI.exe -c port=USB1 -d c:\***\Debug\prjprj.elf

    Explorer
    January 22, 2022

    Thank you, but, I'm looking for either DFU implementation documentation or open source.

    I think I've found that with dfu-util-master over at sourceforge.net.

    Although that has both source and Visual Studio solution files, it unfortunately references but does not include libusb project sources and getopt project sources, which I am trying to find and merge into the dfu-util-master solution.

    Explorer
    January 23, 2022

    Please forgive my relative ignorance on this matter, but are STM32 development boards, e.g., Discovery or 7B3I, not by default in "DFU" mode?

    I have gone through the considerable effort of downloading dfu-util-master from SourceForge.net, plus libusb, plus getopt, getting all three projects to successfully compile and link under Microsoft Visual Studio 2022, and the resultant EXE cannot find any DFU capable devices, although IAR has no problem recognizing, programming and debugging the Discovery and 7B3I via USB.