当前位置:网站首页>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
- Yesterday, Alibaba senior wrote a responsibility chain model, and there were countless bugs
- 故障排查:kubectl报错ValidationError: unknown field \u00a0
- 300+篇文献!一文详解基于Transformer的多模态学习最新进展
- 新加坡暑假旅游攻略:一天玩转新加坡圣淘沙岛
- 鸿蒙第四次学习
- Radian to angle, angle to radian in MATLAB
- How to delete the border of links in IE? [repeat] - how to remove borders around links in IE? [duplicate]
- MySQL about only_ full_ group_ By limit
- Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
猜你喜欢

距离度量 —— 杰卡德距离(Jaccard Distance)
![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](/img/b9/2066a13b160252114c2881007094f8.png)
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

深度学习数学基础

How can retail enterprises open the second growth curve under the full link digital transformation

Distance measurement - Jaccard distance

Mysql高级篇学习总结8:InnoDB数据存储结构页的概述、页的内部结构、行格式

【JVM调优实战100例】03——JVM堆调优四例

Thoroughly understand the point cloud processing tutorial based on open3d!

昨天阿里学长写了一个责任链模式,竟然出现了无数个bug

徹底搞懂基於Open3D的點雲處理教程!
随机推荐
Leetcode (81) -- search rotation sort array II
Leetcode(81)——搜索旋转排序数组 II
Leetcode interview question 17.04 Vanishing numbers
页面标题组件
鸿蒙第四次学习
cJSON 使用详解
谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
Typical application of "stack" - expression evaluation (implemented in C language)
Crypto usage in nodejs
Exness in-depth good article: dynamic series - Case Analysis of gold liquidity (V)
Uncover the whole link communication process of dewu customer service im
2022软件工程期末考试 回忆版
How to set vscode to delete the whole line shortcut key?
How to enable the run dashboard function of idea
Mysql高级篇学习总结7:Mysql数据结构-Hash索引、AVL树、B树、B+树的对比
距离度量 —— 杰卡德距离(Jaccard Distance)
How to write controller layer code gracefully?
全链路数字化转型下,零售企业如何打开第二增长曲线
[daily question] the next day
The second bullet of AI development and debugging series: the exploration journey of multi machine distributed debugging