当前位置:网站首页>Stlink troubleshooting
Stlink troubleshooting
2022-06-29 15:45:00 【NULL_ one thousand nine hundred and sixty-nine】
Preface
Always use the domestic version stlink, But the two on hand recently stlink Something went wrong while downloading , Can't recognize . A search on Taobao found that the price had risen , Remember it used to be 20 about , Now you have to 40 Come on . So I wondered if I could repair it . Baidu searched , It is found that a great God has indeed developed firmware . You can re stlink Re brush the firmware inside .

preparation
stlink It's actually a piece of stm32 Single chip microcomputer . What you have on hand stlink, As shown in the figure above, there is a piece stmf101c8t6, But the firmware found on the Internet is stm32f103c8tc6 Of , Some bloggers say that the two are universal , But after my tests, I found ,103 Of stlink Firmware in 101 It's useless , You can download it , But it still doesn't display when plugged into the computer stlink equipment . therefore , It's better to put the above 101 Switch to 103.
The principle of the brush fastener is , Find one that works stlink, Will be broken stlink Connect to a normally used stlik On , And then use stm32 stlink utility Software to burn .
So before the official start , The preliminary preparations are as follows :
1、stlinkv2 The firmware :ST-Link The firmware V2.J16.S4.hex
2、 Laptop installation stm32 stlink utility Software
3、 A fully functional stlink
4、 A piece of stm32f103c8t6 64pin chip
Operation steps
1、 Open stlink With a knife stlink Pry off the rubber pad on the head usb The rubber pad at this end

2、 Pull out the metal shell 
3、 Use a multimeter to find out the download interface of the chip ,stlink The positive aspects are shown in the figure below
The original version uses stm32f101c8t6, The following figure shows the replacement stm32f103c8t6

4、stlink Single chip microcomputer swd Download Interface . After groping , Successfully found clk and dio Pin , as follows :

Above picture VCC by 5V, Connect the interface shown in the figure above to the one with normal function with wires stlink Connect .
5、 Firmware burning
open stlink utility Software , Follow the sequence below ,①- Connected to the stm32f103;②- open ST-Link The firmware V2.J16.S4.hex The firmware ;③- Burn firmware . Wait for dozens of seconds , Burn complete .
Finally, insert the repaired stlink, The computer can recognize .
Finally open keil mdk , You will be prompted to upgrade stlink The firmware , Upgrade according to the interface requirements . Because I forgot the screenshot , So there is no picture posted here .
thus ,stlink Repair completed , Finally, install the shell back . Again high 了 .
Problems and precautions
It's not that hard to write it out at last , But the whole repair process took a long time . Now I will summarize some problems that occurred at that time .
stm32 Write protect
Start testing stlink The original stm32f101 The voltage is normal , It should not be broken . use st-link utility When connecting , The following problems occurred .
The reason for this problem is , The firmware of the single chip microcomputer turns on write protection . So remove the write protection before brushing the firmware , To remove write protection, you can use st-link utility perhaps jlink Of jflash operation . Here we use st-link utility.
After connecting the single-chip microcomputer , Do the following 
On the open page, do the following 
After that, the firmware can be burned normally .
Be careful : burning ST-Link The firmware V2.J16.S4.hex After firmware , It will enter write protection again , If you want to replace the firmware , Write protection needs to be removed first .
stm32f101c8t6 Not applicable to this firmware
At first, try to use stlink The original stmf101 Purpose , take ST-Link The firmware V2.J16.S4.hex After the firmware is burned in , Plug in the computer and it still can't be recognized as stlink equipment , After many attempts , It's still like this . Basically , The firmware does not fit stm32f101c8t6. Other bloggers are wrong to say that it is universal . The final will be 101 The chip was blown down with a hot-air gun and replaced with stm32f103c8t6.
If a great God finds a match stm32f101c8t6 The firmware of , Please send me , I'll test again .
If you don't have a good one stlink What do I do
If you don't have a good one stlink, Consider using the emulator you have in your hand , such as ulink2. because ulink2 Can only rely on keil mdk Software to operate , Therefore, it cannot be used to write protect stm32 Burning the firmware .
For repairing stlink Come on , Only a new one stm32f103 After Chip , In use ulink2 Of swd Interface to burn firmware , The connection mode is shown in the figure below :ulink20pin Interface 7 Feet are swdio,9 Feet are swclk.

use ulink Only use mdk To burn firmware . use mdk To burn a single hex The file steps are as follows :
1、 New project
porject->new uverion project New project , Then select the chip .stm32f103c8
The newly created project is shown in the following figure , Be sure not to add any startup files , Keep the project empty .
2、 To configure hex File name
Configure according to the following figure hex The firmware . The most critical step is step 3, It must be completely consistent with the firmware we want to burn .
3、 To configure ulink
Here's the easy part , Follow the diagram below .
4、 Burning the firmware
Click the burn firmware button , Perform firmware burning . After burning , Will be repaired stlink Plug in the computer , Can normally recognize . It can also be repaired in this way stlink
Firmware download link
It contains ST-Link The firmware V2.J16.S4.hex, as well as stlink Schematic diagram and pcb Source file , If necessary, you can proofing and making by yourself pcb. If you don't have any points, you can leave me an email .
https://download.csdn.net/download/sinat_36568888/85813603
边栏推荐
- LeetCode-470-用Rand7()实现Rand10()
- MySQL为什么选择B+树存储索引
- MCS: discrete random variable Poisson distribution
- Flink SQL任务TaskManager内存设置
- Classe d'outils commune de fichier, application liée au flux (enregistrement)
- 在shop工程中,实现一个菜单(增删改查)
- Unity C basic review 28 - delegation with return (p449)
- 深度学习遥感数据集
- Cmake learning-2
- GWD:基于高斯Wasserstein距离的旋转目标检测 | ICML 2021
猜你喜欢

Sofaregistry source code | data synchronization module analysis

89.(cesium篇)cesium聚合图(自定义图片)

postgresql源码学习(24)—— 事务日志⑤-日志写入WAL Buffer

Imgutil image processing tool class, text extraction, image watermarking

cmake学习-2

Unity C basic review 27 - delegation example (p448)

Northwestern Polytechnic University attacked by overseas e-mail

Take another picture of cloud redis' improvement path

GWD:基于高斯Wasserstein距离的旋转目标检测 | ICML 2021

mysql XA 分布式事务
随机推荐
Review of digital image processing
极化SAR几种成像模式
NFT链游开发应用:2022年值得关注的6大NFT趋势
Bash summary online log
Scroll, do you understand?
商业智能BI与业务管理决策思维之三:业务质量分析
Kotlin annotation declaration and use
关于遥感图像解译的思考
Uncover the practice of Baidu intelligent test in the field of automatic test execution
Several imaging modes of polarimetric SAR
雷达基本组成
ImgUtil 图片处理工具类,文字提取,图片水印
Andorid Jetpack Hilt
卷积神经网络中各层的作用
kotlin 注解声明与使用
如何用好数据科学?
Informatics Olympiad all in one 1000: introductory test questions
LeetCode笔记:Weekly Contest 299
Informatics Olympiad all in one 2061: trapezoidal area
SSL v** technical principle