Solve the burning problem: Jlink's three-wire SWD method connected to the STM32 chip cannot be recognized

Publisher:TranquilVibesLatest update time:2020-04-07 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

I found this article online that solved the problem that j-flash can only be connected but not burned. I hope that friends who encounter the same problem can use the same method to solve it:


Some time ago, I made a board, and the debugging interface only had three ports, SWD, SWCLK, and GND. When I used Jlink's SWD debugging method, I found that I couldn't connect. I could connect when I used ST-link, but the ST-link connection method of the original poster was quite unreliable, sometimes it could be recognized and sometimes it couldn't be recognized: of course, my ST-link is a copycat version.


So the question is: why can debugging be done by connecting all 20 pins, but not by connecting only three pins?
As the ancients said, if you know, you know. If you don’t know, Google it. If Google doesn’t allow you to use it, then just ask Baidu.


By consulting online information, I found that the 20-pin of jlink not only has the function of debugging, but also the function of power supply and voltage detection.
The following is the interface diagram of jlink.
 
From the above picture, we can see that the 1st pin of jlink is called VTref, which literally means reference voltage. Yes, this pin is the interface for the board to power the internal buffer chip of Jlink. The IO level of the buffer chip is the same as the volts supplied here. It plays a role of level matching.

Pin 2 of the 20-pin JTAG can provide VCC power supply. 
When you open the J-Link Commander and input power on, you will find that the output of pin 2 is 3.3V. Then you can solve the problem by directly short-circuiting pins 1 and 2.


The 2nd pin of the knockoff Jlink of the OP can provide 3.3V voltage to the outside, so if you short the 1st and 2nd pins, the Jlink can be used normally. If the 2nd pin of your Jlink outputs 5V, it is best not to short it like this.
The 20-pin debugging interface on many boards is connected as shown below.
 

After the short connection is completed, if you use the 20-pin debugging again, you must pay attention that the 3.3V of the Jlink must not be connected to the 3.3V of the 20-pin interface on the development board, otherwise the Jlink may be burned out. At this time, you must set the Jlink not to power the development board.

The solution is to add a switch on the 2nd pin of the Jlink. When the Jlink is needed to power the development board, the switch is turned to 3.3V, and when the internal power supply is not needed, it is turned to floating. In this way, the three-wire SWD and 20-wire JTAG and SWD debugging methods can be used at the same time.


/************************************************************/

The problem I encountered was burning stm32f103c8t6. Hardware environment: only connect SWD, SWCLK, GND three wires, and connect external power supply 3.3v power supply; software environment: win10, JlinkV450/JlinkV490/JlinkV502c are all the same, J-flash error:

- ERROR: RAM check failed @ address 0x20000000.
- ERROR: Write: 0x03020100 07060504
- ERROR: Read: 0xAAAAAAAA AAAAAAAA
- ERROR: (0 bytes of RAM have been checked successfully)
- ERROR: Failed to test speed


Solution:

Shorting the 1 and 2 pins of the Jtag interface allows normal programming, but before, programming stm32vet6 could be done normally without shorting, which is still confusing, and I'm not sure what the root cause is.

Reference address:Solve the burning problem: Jlink's three-wire SWD method connected to the STM32 chip cannot be recognized

Previous article:STM8+STVD+COSMIC study notes address is out of range and is ignored
Next article:stvd+stm8s MCU program compilation error

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号