Could not connect to target

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Could not connect to target

2,098 Views
corentinalleard
Contributor I

Hi,

I have an error when  I want to debug an MIMXRT1052CVJ5B.

I debug in SWD with a Jlink

this error :

ERROR: Could not connect to target.
SEGGER J-Link GDB Server V7.54b Command Line Version
JLinkARM.dll V7.54b (DLL compiled Sep 14 2021 16:07:10)
Command line: -nosilent -swoport 2332 -select USB=609302740 -jlinkscriptfile C:\Users\corentin.alleart\Documents\MCUXpressoIDE_11.4.1_6260\workspace\.mcuxpressoide_packages_support\MIMXRT1052xxxxB_support/Script/evkbimxrt1050_sdram_init.jlinkscript -telnetport 2333 -singlerun -endian little -noir -speed auto -port 2331 -vd -device MCIMXRT1052 -if SWD -halt -reportuseraction
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: off
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: C:\Users\corentin.alleart\Documents\MCUXpressoIDE_11.4.1_6260\workspace\.mcuxpressoide_packages_support\MIMXRT1052xxxxB_support/Script/evkbimxrt1050_sdram_init.jlinkscript
J-Link settings file: none
------Target related settings------
Target device: MCIMXRT1052
Target interface: SWD
Target interface speed: auto
Target endian: little
Connecting to J-Link...
J-Link is connected.
Device "MIMXRT1052XXXXA" selected.
Firmware: J-Link V9 compiled May 7 2021 16:26:12
Hardware: V9.30
S/N: 609302740
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 3.33 V
Listening on TCP/IP port 2331
Connecting to target...
ConfigTargetSettings() start
Config JTAG Speed to 4000kHz
ConfigTargetSettings() end
ConfigTargetSettings() start
Config JTAG Speed to 4000kHz
ConfigTargetSettings() end
ConfigTargetSettings() start
Config JTAG Speed to 4000kHz
ConfigTargetSettings() end
ConfigTargetSettings() start
Config JTAG Speed to 4000kHz
ConfigTargetSettings() end
ERROR: Could not connect to target.

 

-------------------

and then a second error occured : 

"Error in final launch sequence 

 

Failed to execute MI command 

-target-select remote localhost:2331

 

Connextion timed out

"

 

Thanks for your help

0 Kudos
Reply
6 Replies

2,054 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I reviewed your information, and the common error is that the user is using the wrong port, in this case, you just need to use the J2, by default the communication interface is SWD if you want to use a JTAG you need to do a rework.

Pavel_Hernandez_0-1686282407478.png

I will suppose you are using SWD, in this case, you are using a J-Link I support you do not have any problem connecting this.

Pavel_Hernandez_1-1686282671206.png

With this you will not have any issue. Do you have a custom board?

Best regards,
Pavel

0 Kudos
Reply

2,038 Views
corentinalleard
Contributor I

Hello,

 

I have a custom Board (inspired by the demoboard).

That's right, I use a Jlink with a 6-pin adapter (like this https://www.segger.com/products/debug-probes/j-link/accessories/adapters/6-pin-needle-adapter/).

 

I then respected the pinout on my board (except for the SWO, which arrives on the ground because I don't use it).

I checked (and compared with the demoboard) the SWDIO, SWDCLK and RST signals on the oscilloscope.
They're consistent. Obviously, the end is not the same, since there's a problem with my board.

Do you have an idea ?

 

Thanks 

Best regards,
Corentin

 

 

 

 

0 Kudos
Reply

2,024 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I reviewed again your log in some cases the problem is the number of MCU, I don't know if your code is from an example, maybe could you check if the MCU number coincides with the MCU shown in the config tool. 

Pavel_Hernandez_0-1686338877045.png

If the MCU is the same, let me know these questions,

Can you flash your board in the past? 
Did you follow the recommendation of the Hardware Development Guide? 
Do you have an external flash memory?
Could you tell me about your configuration of boo mode and boot cfg?

Best regards,
Pavel

0 Kudos
Reply

1,912 Views
corentinalleard
Contributor I

Hello,

 

The MCU is the same.

I've never managed to flash my card, but I can flash the demoboard.

I followed the recommendations in the guide.

Yes, I have an external flash.

I am booting in internal boot.

Attached is my schematic. We added a pull down on JTAG_MOD ( GPIO1_IO08)

We notice a problem during flashing, the SWDIO quiescent voltage is high and SWDIO starts talking in 3V3 then goes to 1V7.

 

 

0 Kudos
Reply

1,897 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I recommend opening an internal case, to check the schematic, tagging my name in the new case.

Best regards,
Pavel

0 Kudos
Reply

2,083 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, let me get into your case and when I have more information, I will contact you.

Best regards,
Pavel

0 Kudos
Reply