Connectivity Issues with Segger Debugger and iMX8 Mini Module

Dear Toradex Support Team,

I hope this email finds you well. I am facing some issues while attempting to use the Segger debugger with the iMX8 Mini SoM, and I would greatly appreciate your assistance.

I connected the Segger debugger to pin header X56 on the iMX8 Mini module and removed the jumpers on pin header X67.

After connecting the debugger, I initiated a connection using the J-Link Commander tool. However, the tool did not detect my iMX8 Mini module, and I received the following error message:

> Connect failed. Resetting via Reset pin and trying again.
> Failed to power up DAP
> Cannot connect to target.

Type “connect” to establish a target connection, ‘?’ for help
J-Link>connect
Please specify device / core. : MIMX8MM6_M4
Type ‘?’ for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>j
Device position in JTAG chain (IRPre,DRPre) : -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. : 4000 kHz
Speed>
Device “MIMX8MM6_M4” selected.

Connecting to target via JTAG
InitTarget() start


J-Link script: iMX8M Mini Cortex-M4 J-Link script


InitTarget() end - Took 9.67ms
TotalIRLen = 4, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP
Failed to power up DAP
Connect failed. Resetting via Reset pin and trying again.
InitTarget() start


J-Link script: iMX8M Mini Cortex-M4 J-Link script


InitTarget() end - Took 15.9ms
TotalIRLen = 4, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP
Failed to power up DAP
Cannot connect to target.

Additionally, I have a couple of questions:

I selected “MIMX8MM6_M4” as the device/core when prompted. Is this the correct selection for my microcontroller? Please confirm if my choice is accurate.

Are there any additional settings or configurations that need to be in place to ensure successful communication between the Segger debugger and the iMX8 Mini module?(like speed)

I would greatly appreciate your guidance in resolving these issues and answering my questions. Please let me know if you require any further information from my end.

Thank you for your attention to this matter.

Best regards,
Mehrdad

Hi @Mehrdad,
I can share some info based on my experience.
First of all, iMX8M Mini family is officiallly supported by Segger


and so, if you bought a JLink probe, you can ask Segger support if you find some issues.

One stupid question: did you power on the Verdin Development Board (pressing ON/OFF button) before
trying to connect?
I played a little bit with the Mini in the past, and everything worked smoothly.

If you want to know which is the right device ID, you can look to Verdin iMX8M-Mini datasheet

You can see it’s MM3 (DualLite) or MM6 (Quad).

Hi @vix ,

Your assistance has helped me gain a better understanding, and I am now 100 percent confident about that.

During my inquiry, my board remained powered on, and I attempted the testing again today.

However, I have a question regarding the testing process. Could you kindly inform me if you conducted the testing using an IDE or J-Link Commander? If an IDE was utilized, I would greatly appreciate it if you could let me know which specific IDE you employed for debugging with JTAG.

Thank you once again for your support. I look forward to your response.

Best regards,
Mehrdad

Hi @Mehrdad

at the very beginning, I followed the steps described on Toradex website, like this one and this one, that describes how to setup VS Code + GCC toolchain.
This page on Segger site describes how to setup VS Code.
At the end, the most effective way that I found is:

  • edit code in VS Code
  • debug using Ozone (i.e., the debugger from Segger)
1 Like

Hello @Mehrdad ,
Were you able to solve the issue with the info provided by @vix ? If so, could you please mark his post as solution?

Best regards,
Josep

1 Like