7283 views|2 replies

227

Posts

0

Resources
The OP
 

Common solutions for J-Link failing to connect to the chip [Copy link]

In some cases, the J-Link/Flasher emulator may not be able to connect to the chip correctly, resulting in debugging failure in the IDE, with an error message such as "Failed to get CPU status after 4 retries". The chip status cannot be obtained, which may be caused by the failure of J-Link to connect to the chip successfully.

Common solutions

1. Verify the connection between J-Link and PC

J-Link Commander is usually used to verify the connection status between J-Link and PC, and whether the computer can successfully identify J-Link. Open J-Link Commander to view the current J-Link connection status and hardware version information.

If you cannot see the above information, you can open the device manager on your computer to see if the J-Link device can be detected in the device manager, as shown in the figure below:

If the device cannot be detected successfully, please try the following methods:

1. Restart the PC to ensure that the USB protocol itself is not in a messed up state

2. Replace the USB connection cable

3. Try another USB port

4. If a USB hub is used, remove it

5. Try to reinstall the J-Link driver, or upgrade the J-Link driver to the latest version

6. Switch to another PC for testing to rule out problems with the PC itself

2. Verify the connection between J-Link and chip

When verifying the connection between J-Link and the chip, it is recommended to use the chip company's official evaluation board or other reliable hardware devices for verification to avoid problems that may be caused by incorrect hardware design.

First, update the J-Link driver to the latest version through the following link:

https://www.segger.com/downloads/jlink

Follow the steps below to connect J-Link to the chip:
1. Connect J-Link to the PC

2. Power the development board

3. Connect J-Link to the development board

4. Open J-Link Commander and enter commands such as connect to test

If the connection fails when you enter the connect command line, check the following:

1. Vtref = 0 v

J-Link uses the target board reference voltage to create the level of the debug signal, so this pin must be connected to the chip's power pin to obtain the correct target board reference voltage. When the situation shown in the figure below occurs, please check the chip's power supply and the connection of the Vtref pin.

2. Check the power supply of the target board and verify its power supply

Use a multimeter to measure the voltage between pin 1 (Vtref) and pin 4 (GND) of the J-Link to make sure that the J-Link can detect the reference voltage of the target board.

3. Confirm whether the correct debugging interface is selected

There are multiple debugging interfaces on different chips, such as JTAG and SWD. First, you need to confirm whether the chip can support a certain debugging interface. For example, some earlier chip models may only support the JTAG debugging interface but not the SWD debugging interface.

In addition to confirming that the chip can support the debug interface, you should also further check the hardware design of the debug interface of the target board to ensure that the chip's debug pins are successfully connected to the debug interface.

4. After programming the target device, the connection can no longer be established

Please check the relevant security settings of the target device. In some devices, specific registers can be written to disable the debug interface, resulting in a failure to connect, or there are other security measures on the chip that affect the debugging function of the chip. It is recommended to check the chip manual for confirmation.

Latest reply

Similar, to solve the computer Internet problem, if you use the pin command, it's very cool Sometimes just plugging and unplugging the network cable will fix it   Details Published on 2021-2-19 15:08
Personal signature

欢迎关注“麦克泰技术”

 
 

2w

Posts

341

Resources
2
 

In fact, it is a connection problem, most of which are loose wires

The command test method is rarely used, but when solving a problem, it looks cool to use the command test

 
 
 

2w

Posts

341

Resources
3
 

Similar, to solve the computer Internet problem, if you use the pin command, it's very cool

Sometimes just plugging and unplugging the network cable will fix it

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list