当前位置:网站首页>Stm32g0 USB DFU upgrade verification error -2
Stm32g0 USB DFU upgrade verification error -2
2022-07-02 19:00:00 【gdut_ llkkyy】
One 、 The problem I have
1.1 summary
Need to use stm32g0 Series MCU realizes firmware upgrade function , The upgrade scheme selected is STM32 USB DFU programme . Because we need to do product and firmware matching , There are other features , So I didn't choose the built-in boot, It's about writing boot, To implement inside usb dfu function .pc Client side usage st Official DfuSeDemo .
1.2 Problems encountered
According to the online process , Take advantage of the official cubemx Produced boot engineering , Configured with flash Read and write api,boot It's done. . During the test, I found that , When upgrading firmware on some computers , Random verification errors . Tips : matching not good . first difference at address ... . Some computers appear very frequently , Some computers , The probability of occurrence is very low .
Two 、 Hardware connection
2.1 D+ D- Connect

2.2 pin Power supply
USB USB-PD, USB-MD Connected IO Need to pass through VDDIO2 Power supply ,VDDIO2 Need to provide a 1.6 ->3.6v The voltage of 
2.3 VDDUSB IO
stay AN2606 In the document , mention VDDUSB IO Must receive 3.3v, But I couldn't find it VDDUSB IO.
3、 ... and 、 Use factory boot verification
boot The project is generated and slightly modified according to official tools , The circuit connection is also relatively simple , But still random error, verification error , Can it be the single chip computer usb There is a problem with its performance ? To test this mcu Of usb performance , I decided to use the official usb dfu boot verification .
Here's the choice pc The upper computer is the latest version of the official website STM32CubeProgrammer , If it all goes wrong , The estimated probability is mcu Its own problem .
3.1 mcu How to access the built-in usb dfu boot ?
file AN2606 mention The STM32G0B1xx/0C1xx bootloader is activated by applying Pattern 11 , STM32G0B1 Series MCU , Use Pattern 11 Enter built-in Boot Pattern .Pattern 11 The definition is as follows :
As shown in the figure above ,Pattern11 There are also several ways , You can choose , I chose the second way : Through the first STM32CubeProgrammer take mcu Medium nBoot1(bit) Set to 1,nBOOT0_SEL(bit) Set to 0 , And then mcu Of Boot0(pin) Pick up 3.3v. Power on and restart , Access usb Line , Get into boot Pattern ;
3.2 Upgrade verification
With STM32CubeProgrammer For the upper computer , In different pc The upgrade verifies , There is no verification error .
3.3 Summary of this round
built-in boot The upgrade is normal , explain mcu Of itself usb The circuit is ok . Still need to find their own reasons . The reasons may be the following two :
- Built by myself boot There is a problem .
- Selected upgrade client
DfuSeDemoThere is a problem .
Four 、 episode , Client not recognized
4.1 Problems encountered
The installation uses STM32CubeProgrammer after , Reuse DfuSeDemo , Find out DfuSeDemo Unable to identify the device ( STM Device in DFU Mode ) .
4.2 Problem finding
Turn on my computer -> Device manager , Found under the universal serial bus device : STM32 Download Firmware Update This device .
4.3 solve
Right click on the STM32 Download Firmware Update , Select uninstall device , And delete the device driver .

take usb Line unplugging device , Then insert the device ,DfuSeDemo Re identify the device .
5、 ... and 、 Problem solving
Checked boot Code of each module of the project , Nothing unusual . Found behind STM32G0 The latest driver library is V1.5.1 , And I use V1.5.0 . Updated the latest driver library , Problem solved . Compared the two versions of code , Found in stm32g0xx_ll_usb.c This document has made a lot of changes , This happens to be usb Drive function library . No time for the moment , Knowledge reserve is not enough , Have the opportunity to analyze the differences in this file in detail .
边栏推荐
- 拦截器与过滤器的区别
- R language dplyr package Na_ The if function converts the control in the vector value into the missing value Na, and converts the specified content into the missing value Na according to the mapping r
- 2022软件工程期末考试 回忆版
- Have you stepped on the nine common pits in the e-commerce system?
- 深度神经网络总结
- SQL training 2
- PR曲线和ROC曲线概念及其区别
- Web实时通信技术之Websocket
- 【JVM调优实战100例】01——JVM的介绍与程序计数器
- Simulateur nightGod + application de test de capture de paquets Fiddler
猜你喜欢

The text editor hopes to mark the wrong sentences in red, and the text editor uses markdown

Mysql高级篇学习总结7:Mysql数据结构-Hash索引、AVL树、B树、B+树的对比

How can retail enterprises open the second growth curve under the full link digital transformation
![[daily question] first day](/img/8c/f25cddb6ca86d44538c976fae13c6e.png)
[daily question] first day

How to clean up discarded PVs and their corresponding folders

一款简约PHP个人发卡程序V4.0版本

夜神模擬器+Fiddler抓包測試App

300+篇文献!一文详解基于Transformer的多模态学习最新进展

医院在线问诊源码 医院视频问诊源码 医院小程序源码

新加坡暑假旅游攻略:一天玩转新加坡圣淘沙岛
随机推荐
Singapore summer tourism strategy: play Singapore Sentosa Island in one day
一款简约PHP个人发卡程序V4.0版本
Mysql高级篇学习总结7:Mysql数据结构-Hash索引、AVL树、B树、B+树的对比
The difference between SLC, MLC, TLC and QLC NAND SSD: which is better?
Troubleshooting ideas that can solve 80% of faults
[daily question] first day
reduce--遍历元素计算 具体的计算公式需要传入 结合BigDecimal
谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
27: Chapter 3: develop Passport Service: 10: [registration / login] interface: after the registration / login is OK, save the user session information (uid, utoken) to redis and cookies; (one main poi
如何清理废弃pv和其对应的文件夹
The text editor hopes to mark the wrong sentences in red, and the text editor uses markdown
如何设置VSCode删除整行快捷键?
Industrial software lecture - core technology analysis of 3D CAD design software - the second lecture of the Forum
R language uses lrtest function of epidisplay package to perform likelihood ratio test on multiple GLM models (logisti regression). Compare whether the performance of the two models is different, and
LightGroupButton* sender = static_cast<LightGroupButton*>(QObject::sender());
怎么用ps提取图片颜色分析色彩搭配
Deep neural network Summary
SQL training 2
How to use PS to extract image color and analyze color matching
Matlab中弧度转角度、角度转弧度