I recently used USB and later found that STM32F103 can implement DFU programmatically. I searched the code online and compared it with the official document and found that it was DFU for large-capacity FLASH. I used STM32F103C8T6, which is medium-capacity. I modified the code of netizens according to the official routine. After changing it to medium-capacity, I can use DFU to update the firmware. There are a few points to pay attention to during the modification process
1. Add the vector table offset at the end of the library function "void SystemInit (void)" and enable global interrupts (disabled interrupts in DFU, enable them here). As shown below
2. Modify the MDK app program offset, as shown below: (20K FLASH is reserved for USB DFU, so the APP code starts at address 0x8005000)
3. After the APP modification is completed, you need to modify the APP jump address in the DFU code, as shown below:
After the modification is completed, use the official "DfuSe_Demo_V3.0_Setup.exe" software to download.
Application environment: Slave computer - STM32F103C8T6
DFU code length 16K
APP code length 27K (based on USB-HID class card issuer)
Host computer-win7 Ultimate 64-bit
DfuSe_Demo_V3.0_Setup.exe
Previous article:STM32 SD bootloader implementation
Next article:Use of STM32F4 RTC
Recommended ReadingLatest update time:2024-11-16 17:55
- Popular Resources
- Popular amplifiers
- Virtualization Technology Practice Guide - High-efficiency and low-cost solutions for small and medium-sized enterprises (Wang Chunhai)
- usb_host_device_code
- Transplantation of real-time operating system RT-ThreadSmart on STM32MP1
- Design of switching power supply with adjustable output voltage based on STM32
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [ST NUCLEO-G071RB Review] + Driving LCD5110 display and enabling systick
- What does this warning mean and how to deal with it?
- I have seen many articles saying that the IO port of STM32 can be set to 8 modes. How to set it? Use the control register to set...
- Xunwei IMX6ULL development board installs VMware Tool
- Introduction to C programming under Ubuntu for Xunwei IMX6ULL development board (Part 2)
- Problem of filter network with two probes
- Design scheme for realizing communication between upper and lower computers via USB
- Which parameters in the datasheet of the five devices, diode, triode, MOS tube, op amp, and optocoupler, can reflect...
- I want a Zircon A4 FPGA board (without downloader). If you have one, please contact me.
- Overview of TI Power Supply EMI Specifications