当前位置:网站首页>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 .
边栏推荐
- Night God simulator +fiddler packet capture test app
- R language ggplot2 visualization: visualize the line chart and add customized X-axis label information to the line chart using labs function
- cJSON 使用详解
- How to delete the border of links in IE? [repeat] - how to remove borders around links in IE? [duplicate]
- 迷你高尔夫球场:伦敦休闲旅游好去处
- Comprendre complètement le tutoriel de traitement de Point Cloud basé sur open3d!
- How to enable the run dashboard function of idea
- 日期工具类(不定时更新)
- promise 和 Observable 的区别
- Eliminate the yellow alarm light on IBM p750 small computer [easy to understand]
猜你喜欢

Leetcode interview question 17.04 Vanishing numbers

材质UV遮罩的技巧

Stratégie touristique d'été de Singapour: un jour pour visiter l'île de San taosha à Singapour

M2dgr: slam data set of multi-source and multi scene ground robot (ICRA 2022)

Singapore summer tourism strategy: play Singapore Sentosa Island in one day

【JVM调优实战100例】02——虚拟机栈与本地方法栈调优五例

How to clean up discarded PVs and their corresponding folders

Mini Golf Course: a good place for leisure and tourism in London

Industrial software lecture - core technology analysis of 3D CAD design software - the second lecture of the Forum

Comprendre complètement le tutoriel de traitement de Point Cloud basé sur open3d!
随机推荐
IPtable port redirection masquerade[easy to understand]
StretchDIBits函数
什么是云原生?这回终于能搞明白了!
SAP S/4HANA OData Mock Service 介绍
Redis (6) -- object and data structure
工业软件讲堂-三维CAD设计软件的核心技术解析----讲坛第二次讲座
学生抖音宣传母校被吐槽“招生减章”,网友:哈哈哈哈哈哈
R language ggplot2 visual Facet: gganimate package is based on Transition_ Time function to create dynamic scatter animation (GIF)
日期工具类(不定时更新)
Websocket of Web real-time communication technology
How to enable the run dashboard function of idea
Leetcode(154)——寻找旋转排序数组中的最小值 II
怎么用ps提取图片颜色分析色彩搭配
Singapore summer tourism strategy: play Singapore Sentosa Island in one day
页面标题组件
AI开发调试系列第二弹:多机分布式调测探索之旅
Crypto usage in nodejs
Troubleshooting ideas that can solve 80% of faults
Uncover the whole link communication process of dewu customer service im
2022软件工程期末考试 回忆版