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.
Previous article:STM8+STVD+COSMIC study notes address is out of range and is ignored
Next article:stvd+stm8s MCU program compilation error
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Looking for experts to develop ALTERA CYCLONE board
- [NXP Rapid IoT Review] + 2. App connects to Rapid IoT
- Small household appliances frequency control through EMC method
- LSM6DSO(X) sensor driver key code analysis: read_data_polling routine related resources
- [Gesture recognition and scene reproduction based on ESP32] Material unboxing—ESP32-S2-KALUGA-1 and k210
- How to design a type-c interface for lithium battery power supply circuit design
- PCB copper plating problem
- [Project source code] Using scripts in Quartus II to convert sof to rbf files
- [Flower carving DIY] Interesting and fun music visualization series of small projects (07) --- large square spectrum light
- stm32 and dht11