当前位置:网站首页>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
边栏推荐
猜你喜欢

File common tool class, stream related application (record)

Render follows, encapsulating a form and adding data to the table

Mingdeyang xilinx-k7-325t/410t core board data manual

Unity C # basic review 26 - first acquaintance Commission (p447)

Classe d'outils commune de fichier, application liée au flux (enregistrement)

MCS: discrete random variable - binomial distribution

Google 软件版本经历周期

File常用工具類, 流相關運用 (記錄)

MCS: discrete random variables - geometric distribution

Uncover the practice of Baidu intelligent test in the field of automatic test execution
随机推荐
Neural network for remote sensing image processing
swoole TCP 分布式实现
PostgreSQL source code learning (24) -- transaction log ⑤ - log writing to wal buffer
Flink SQL任务TaskManager内存设置
欧标插头EN50075测试项目
swift JSONSerialization
上次给我们发福利的 TDesign ,今天讲讲它的开源故事
数据挖掘复习
适用于遥感图像处理的神经网络
Deeply understand promise's hand and teach you to write a version
11.应用层数据传输格式/端口号-bite
MCS: discrete random variable - Hyper geometric distribution
11. application layer data transmission format / port number -bite
Classe d'outils commune de fichier, application liée au flux (enregistrement)
数字图像处理复习
LeetCode-470-用Rand7()实现Rand10()
TDesign, which gave us benefits last time, will tell us its open source story today
File常用工具類, 流相關運用 (記錄)
极化SAR地表分类
这是少了什么依赖嘛?FlinkSql打包运行的时候报错,但是本地idea跑的时候是没问题的,求解,谢