STM32 USB DFU function

Publisher:SerendipityGlowLatest update time:2017-09-11 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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


Keywords:STM32 Reference address:STM32 USB DFU function

Previous article:STM32 SD bootloader implementation
Next article:Use of STM32F4 RTC

Recommended ReadingLatest update time:2024-11-16 17:55

Understanding of USB buffer after using STM32 USB module
I recently developed a project using the STM32 USB module. I thought it was quite simple, but it took me almost two days to get the USB packet buffer accessed. Here is a brief summary.   The STM32 USB module packet buffer has 512B, but the memory image in the STM32 reference manual shows 0x40006000-0x400063ff, which i
[Microcontroller]
STM32 TFT Learning Notes - Touch Screen
Host environment: Windows 7 SP1 Development environment: MDK5.14 Target board: ST NUCLEO-F303RE TFT model: 2.4 inches, with touch, SD card, 240*320 resolution, 260,000 colors Driver IC:ILI9325 ST library version: STM32Cube_FW_F3_V1.1.0 SD卡:Kingston 16GB Micro SDHC Class 10 Touch IC: XPT2046 A lot of in
[Microcontroller]
STM32 TFT Learning Notes - Touch Screen
STM32 encoder interface mode
What is an encoder? It is a fun thing and an indispensable gadget for measuring the speed of a car. Below, I will start from the principle of the encoder and talk about how to use the encoder interface mode of stm32 to measure the motor speed and direction. 1. Encoder Figure 1 Encoder schematic diagram       Figure
[Microcontroller]
STM32 encoder interface mode
Application of AVR Soft USB Interface in Data Acquisition System
  When designing the AVR soft USB interface firmware (ATmega8 microcontroller program), the USB interface parameter configuration is set according to the USB-isp (also the AVR soft USB virtual RS232 interface) download line; and its virtual serial port driver is installed in the PC system. It can support PC operating
[Microcontroller]
Application of AVR Soft USB Interface in Data Acquisition System
USB port failure analysis of vehicle infotainment system
With the continuous upgrading of car engines, the sense of technology inside and outside the car is getting stronger and stronger. The biggest feeling we have is that cars have more and more functions and are becoming more and more intelligent. The realization of these functions is due to the continuous development of
[Automotive Electronics]
USB port failure analysis of vehicle infotainment system
STM32 CAN bus description
Introduction: CAN is the abbreviation of Controller Area Network (hereinafter referred to as CAN), which is an ISO internationally standardized serial communication protocol. It was first proposed by German electrical company Bosch in 1986. Since then, CAN has been standardized through ISO11898 and ISO11519. It is no
[Microcontroller]
STM32 study notes 1 IO port learning
The IO port of STM32 can be configured into 8 modes by software: 1. Input floating 2. Input pull-up 3. Input drop-down 4. Analog Input 5. Open drain output 6. Push-pull output 7. Push-pull multiplexing function 8. Open-drain multiplexing function Each IO port can be freely programmed, and the registers of a single IO
[Microcontroller]
Explanation of the method of driving 80 bus LCD screen with STM32 FSMC
Here we first look at the so-called 80 timing diagram of the TFT LCD screen: After comparison, we found that the SRAM timing of STM32's FSMC is very similar to the 80 bus, and can also be applied: Here, as long as the address line is regarded as RS, it can be equivalent to 80 timing. The specific implementation me
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号