当前位置:网站首页>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
DfuSeDemo
There 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 .
边栏推荐
- Stretchdibits function
- 元宇宙链游系统开发(逻辑开发)丨链游系统开发(详细分析)
- [daily question] first day
- SAP S/4HANA OData Mock Service 介绍
- Leetcode (81) -- search rotation sort array II
- Concepts and differences of PR curve and ROC curve
- options should NOT have additional properties
- 任职 22 年,PowerShell 之父将从微软离职:曾因开发 PowerShell 被微软降级过
- 【JVM调优实战100例】01——JVM的介绍与程序计数器
- Mysql高级篇学习总结8:InnoDB数据存储结构页的概述、页的内部结构、行格式
猜你喜欢
Excel如何进行隔行复制粘贴
昨天阿里学长写了一个责任链模式,竟然出现了无数个bug
Leetcode(81)——搜索旋转排序数组 II
材质UV遮罩的技巧
谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
How to play when you travel to Bangkok for the first time? Please keep this money saving strategy
A simple PHP personal card issuing program v4.0
科技公司不同人对Bug的反应 | 每日趣闻
Ali was wildly asked by the interviewer on three sides. Redis dared not write 'proficient' on his resume anymore
Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
随机推荐
[daily question] the next day
R language uses the lsnofunction function function of epidisplay package to list all objects in the current space, except user-defined function objects
PR曲线和ROC曲线概念及其区别
Uncover the whole link communication process of dewu customer service im
[Yugong series] July 2022 go teaching course 001 introduction to go language premise
reduce--遍历元素计算 具体的计算公式需要传入 结合BigDecimal
Redis(6)----对象与数据结构
Web version 3D visualization tool, 97 things programmers should know, AI frontier paper | information daily # 2022.07.01
深度学习数学基础
SLC、MLC、TLC 和 QLC NAND SSD 之间的区别:哪个更好?
阿里三面被面试官狂问Redis,简历上再也不敢写'精通'了
Leetcode interview question 17.04 Vanishing numbers
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
Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
故障排查:kubectl报错ValidationError: unknown field \u00a0
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
Leetcode(81)——搜索旋转排序数组 II
Night God simulator +fiddler packet capture test app
昨天阿里学长写了一个责任链模式,竟然出现了无数个bug
M2dgr: slam data set of multi-source and multi scene ground robot (ICRA 2022)