cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a C++ Program to Update STM32F722 Firmware via USB DFU

Juanjo97
Associate II

I am currently working on a project where I need to create a C++ program for my PC that simplifies the firmware update process for an STM32F722 microcontroller. I have successfully placed the microcontroller in bootloader mode, which comes preloaded by default, and now I want to program it via USB using the DFU (Device Firmware Upgrade) mode.

I have already reviewed documentation such as AN3156, but I am still unclear about how to implement it effectively. Has anyone worked on a similar project or can provide guidance on how to achieve this?

My goal is to make the firmware update process as user-friendly as possible for the end-users. Any insights, code snippets, or project references related to STM32F722 firmware updates via USB DFU would be greatly appreciated.

Thank you in advance for your assistance!

3 REPLIES 3
TDK
Guru

You could use STM32CubeProgrammer in command line mode to do the update, or something similar that is transparent to the user.

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

Thank you for the suggestion, but I'm actually looking to develop my own custom Firmware Update (DFU) application for a specific commercial use case. My goal is to have complete control over the update process and tailor it to the needs of my project. Can you provide me with some tips or resources to get started on implementing my own firmware update solution? Any guidance would be greatly appreciated."

Pavel A.
Evangelist III

Please refer to the CubeProgrammer API which is installed with the CubeProgrammer. Go to the CubeProgrammer directory, open api/src/USB_Example.cpp.  Documentation is in api/doc/STM32CubeProgrammer_API.chm