Update the firmware of an STM32 CPU via USB cable using the USB DFU protocol.
This application allows you to update the firmware of an STM32 CPU through a USB cable by utilizing the USB DFU protocol.
The implementation of this application is based on the following documents from STMicroelectronics.
1. AN2606: STM32 microcontroller system memory boot mode
2. AN3156: USB DFU protocol used in the STM32 bootloader
How to use the application.
PREREQUISITE
Your mobile device must support USB-OTG.
PREPARATION
1. Connect your STM32 board to your mobile device using a USB-OTG cable.
2. Activate bootloader mode on the STM32. Refer to AN2606 for instructions. Generally, this involves setting the BOOT0 and BOOT1 pins to the correct combination for your specific CPU model.
PROGRAMMING
1. Select the firmware file you want to write.
- The firmware file must be in one of the following formats:
- Intel Hex
- Motorola S-Record
- DfuSe (STMicroelectronics DFU format)
- Raw binary
2. Configure your desired writing options. You can choose from:
- Erase only necessary pages
- Remove readout protection if needed
- Start the CPU after programming
3. Press the "Load file to flash" button and wait for the operation to complete.
The application also supports the following additional operations:
- Erasing the flash
- Checking if the flash is blank
- Comparing flash contents with a file.
You can select these operations via their corresponding menu items.
The application has been tested on the following microcontroller models:
STM32F072
STM32F205
STM32F302
STM32F401
STM32F746
STM32G474
STM32L432
USAGE RESTRICTIONS
You can perform up to 25 firmware uploads completely free of charge.
Once you reach this limit, you can purchase one of two services:
1. An additional 100 uploads
2. Unlimited use of the application.