当前位置:网站首页>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 .
边栏推荐
- Yesterday, Alibaba senior wrote a responsibility chain model, and there were countless bugs
- 故障排查:kubectl报错ValidationError: unknown field \u00a0
- 鸿蒙第四次学习
- R language ggplot2 visualization: gganimate package creates dynamic histogram animation (GIF) and uses transition_ The States function displays a histogram step by step along a given dimension in the
- Basic idea of quick sorting (easy to understand + examples) "suggestions collection"
- 工业软件讲堂-三维CAD设计软件的核心技术解析----讲坛第二次讲座
- Redis(7)----数据库与过期键
- 距离度量 —— 杰卡德距离(Jaccard Distance)
- R语言ggplot2可视化:可视化折线图、使用labs函数为折线图添加自定义的X轴标签信息
- 怎么用ps提取图片颜色分析色彩搭配
猜你喜欢

Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future

文字编辑器 希望有错误的句子用红色标红,文字编辑器用了markdown

新加坡暑假旅遊攻略:一天玩轉新加坡聖淘沙島

Leetcode(81)——搜索旋转排序数组 II

彻底搞懂基于Open3D的点云处理教程!

A simple PHP personal card issuing program v4.0

材质UV遮罩的技巧

工业软件讲堂-三维CAD设计软件的核心技术解析----讲坛第二次讲座

Troubleshooting ideas that can solve 80% of faults

【每日一题】第一天
随机推荐
promise 和 Observable 的区别
reduce--遍历元素计算 具体的计算公式需要传入 结合BigDecimal
Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
在支付宝账户上买基金安全吗
The second bullet of AI development and debugging series: the exploration journey of multi machine distributed debugging
R language dplyr package filter function filters dataframe data. If the name of the data column (variable) to be filtered contains quotation marks, you need to use!! SYM syntax processing, otherwise n
R language ggplot2 visualization: visualize the line chart and add customized X-axis label information to the line chart using labs function
Leetcode (154) -- find the minimum value II in the rotation sort array
“栈”的典型应用—表达式求值(C语言实现)
工业软件讲堂-三维CAD设计软件的核心技术解析----讲坛第二次讲座
Meal card hdu2546
sql训练2
How to copy and paste interlaced in Excel
The text editor hopes to mark the wrong sentences in red, and the text editor uses markdown
R语言dplyr包rowwise函数、mutate函数计算dataframe数据中多个数据列在每行的最大值、并生成行最大值对应的数据列(row maximum)
R language uses Cox of epidisplay package Display function obtains the summary statistical information of Cox regression model (risk rate HR, adjusted risk rate and its confidence interval, P value of
快速排序基本思路(通俗易懂+例子)「建议收藏」
R language uses the lsnofunction function function of epidisplay package to list all objects in the current space, except user-defined function objects
SLC、MLC、TLC 和 QLC NAND SSD 之间的区别:哪个更好?
The difference between promise and observable