JTAG Fails to Connect on i.MX8MP Without Prior Boot – Why?

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

JTAG Fails to Connect on i.MX8MP Without Prior Boot – Why?

Jump to solution
1,522 Views
YorkerHazan
Contributor I

Hi everyone,

I'm working on bring-up for a custom board using the i.MX8M Plus (i.MX8MP) and encountering an issue with JTAG debug access. I'm using a Segger J-Link debugger and connecting directly to the JTAG interface (TCK, TMS, TDI, TDO, nRESET, VTref, GND). The physical connections are verified and correct.

Here's the issue:

  • If the SoC is powered on without any bootable device present (e.g., no eMMC, SD, or USB boot), JTAG fails to connect — the debugger cannot detect the CPU.

  • However, if the SoC boots any firmware (even just U-Boot), JTAG becomes responsive afterwards, and I can connect, halt, and debug as expected.

This suggests that JTAG is not operational at cold boot unless some firmware runs first. That seems a bit counter-intuitive for low-level bring-up.

My Questions:

  1. Why is the JTAG/DAP interface not available immediately after power-on reset?

  2. Is there something in the Boot ROM or clocks/power/IOMUX setup that needs to be configured first before JTAG can function?

  3. Is this behavior documented somewhere in the Reference Manual or other official documentation?

Any insights or guidance would be appreciated!

Thanks,
Yorker Hazan.

Labels (1)
0 Kudos
Reply
1 Solution
1,416 Views
June_Lu
NXP TechSupport
NXP TechSupport

No, you could refer the description below:

June_Lu_1-1748308733817.png

 

 

View solution in original post

0 Kudos
Reply
6 Replies
1,483 Views
June_Lu
NXP TechSupport
NXP TechSupport

Please refer to AN14120.pdf, Debugging Cortex-M with VS Code on i.MX 8M, i.MX 8ULP, and i.MX 9 to do the debug.

Thanks

0 Kudos
Reply
1,435 Views
YorkerHazan
Contributor I

Hey,

Thank you for your reply, but it did not answer my question.

Is there a way to connect with JTAG without prior boot?

0 Kudos
Reply
660 Views
NXP_USER_05
Contributor I

Hi,

I have some questions regarding JTAG connectivity and boot options for a custom i.MX8M Plus board.

  1. How do you typically connect your board for debugging — using JTAG or another interface?

    • If JTAG is used, do you connect after U-Boot has executed or before boot (at power-on reset)?

  2. In our custom board, USB and SD interfaces are not populated, so we currently have only JTAG available for communication and detection.

    • Could you please advise on the correct procedure or configuration to bring up the board only via JTAG (DAP-Link or DSTREAM-ST)?

    • Is there any additional configuration needed in the JTAG_MOD / Boot_Mode pins for enabling debug access when no boot device is present?

  3. Is booting is mandatory for JTAG detection  and connect to the board? 
0 Kudos
Reply
580 Views
June_Lu
NXP TechSupport
NXP TechSupport

Please create a new case to address your issue.

Thanks

0 Kudos
Reply
1,417 Views
June_Lu
NXP TechSupport
NXP TechSupport

No, you could refer the description below:

June_Lu_1-1748308733817.png

 

 

0 Kudos
Reply
1,397 Views
YorkerHazan
Contributor I

Thank you very much!

This explains the situation very clearly.

Have a nice day!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2101403%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EJTAG%20Fails%20to%20Connect%20on%20i.MX8MP%20Without%20Prior%20Boot%20%E2%80%93%20Why%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2101403%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20class%3D%22%22%3EHi%20everyone%2C%3C%2FP%3E%3CP%20class%3D%22%22%3EI'm%20working%20on%20bring-up%20for%20a%20custom%20board%20using%20the%20i.MX8M%20Plus%20(i.MX8MP)%20and%20encountering%20an%20issue%20with%20JTAG%20debug%20access.%20I'm%20using%20a%20Segger%20J-Link%20debugger%20and%20connecting%20directly%20to%20the%20JTAG%20interface%20(TCK%2C%20TMS%2C%20TDI%2C%20TDO%2C%20nRESET%2C%20VTref%2C%20GND).%20The%20physical%20connections%20are%20verified%20and%20correct.%3C%2FP%3E%3CP%20class%3D%22%22%3EHere's%20the%20issue%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%20class%3D%22%22%3EIf%20the%20SoC%20is%20powered%20on%20without%20any%20bootable%20device%20present%20(e.g.%2C%20no%20eMMC%2C%20SD%2C%20or%20USB%20boot)%2C%20JTAG%20fails%20to%20connect%20%E2%80%94%20the%20debugger%20cannot%20detect%20the%20CPU.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22%22%3EHowever%2C%20if%20the%20SoC%20boots%20any%20firmware%20(even%20just%20U-Boot)%2C%20JTAG%20becomes%20responsive%20afterwards%2C%20and%20I%20can%20connect%2C%20halt%2C%20and%20debug%20as%20expected.%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20class%3D%22%22%3EThis%20suggests%20that%20JTAG%20is%20not%20operational%20at%20cold%20boot%20unless%20some%20firmware%20runs%20first.%20That%20seems%20a%20bit%20counter-intuitive%20for%20low-level%20bring-up.%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSTRONG%3E%3CU%3EMy%20Questions%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%20class%3D%22%22%3EWhy%20is%20the%20JTAG%2FDAP%20interface%20not%20available%20immediately%20after%20power-on%20reset%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22%22%3EIs%20there%20something%20in%20the%20Boot%20ROM%20or%20clocks%2Fpower%2FIOMUX%20setup%20that%20needs%20to%20be%20configured%20first%20before%20JTAG%20can%20function%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22%22%3EIs%20this%20behavior%20documented%20somewhere%20in%20the%20Reference%20Manual%20or%20other%20official%20documentation%3F%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%20class%3D%22%22%3EAny%20insights%20or%20guidance%20would%20be%20appreciated!%3C%2FP%3E%3CP%20class%3D%22%22%3EThanks%2C%3CBR%20%2F%3EYorker%20Hazan.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2101403%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2196574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Fails%20to%20Connect%20on%20i.MX8MP%20Without%20Prior%20Boot%20%E2%80%93%20Why%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2196574%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPlease%20create%20a%20new%20case%20to%20address%20your%20issue.%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2192868%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Fails%20to%20Connect%20on%20i.MX8MP%20Without%20Prior%20Boot%20%E2%80%93%20Why%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2192868%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20some%20questions%20regarding%20JTAG%20connectivity%20and%20boot%20options%20for%20a%20custom%20i.MX8M%20Plus%20board.%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3EHow%20do%20you%20typically%20connect%20your%20board%20for%20debugging%20%E2%80%94%20using%20JTAG%20or%20another%20interface%3F%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EIf%20JTAG%20is%20used%2C%20do%20you%20connect%20%3CSTRONG%3Eafter%20U-Boot%3C%2FSTRONG%3E%20has%20executed%20or%20%3CSTRONG%3Ebefore%20boot%20(at%20power-on%20reset)%3C%2FSTRONG%3E%3F%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIn%20our%20custom%20board%2C%20%3CSTRONG%3EUSB%20and%20SD%20interfaces%20are%20not%20populated%3C%2FSTRONG%3E%2C%20so%20we%20currently%20have%20%3CSTRONG%3Eonly%20JTAG%3C%2FSTRONG%3E%20available%20for%20communication%20and%20detection.%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3ECould%20you%20please%20advise%20on%20the%20correct%20procedure%20or%20configuration%20to%20bring%20up%20the%20board%20only%20via%20JTAG%20(DAP-Link%20or%20DSTREAM-ST)%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIs%20there%20any%20additional%20configuration%20needed%20in%20the%20%3CSTRONG%3EJTAG_MOD%20%2F%20Boot_Mode%3C%2FSTRONG%3E%20pins%20for%20enabling%20debug%20access%20when%20no%20boot%20device%20is%20present%3F%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EIs%20booting%20is%20mandatory%20for%20JTAG%20detection%26nbsp%3B%20and%20connect%20to%20the%20board%3F%26nbsp%3B%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2106041%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Fails%20to%20Connect%20on%20i.MX8MP%20Without%20Prior%20Boot%20%E2%80%93%20Why%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2106041%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20very%20much!%3C%2FP%3E%3CP%3EThis%20explains%20the%20situation%20very%20clearly.%3C%2FP%3E%3CP%3EHave%20a%20nice%20day!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2104676%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Fails%20to%20Connect%20on%20i.MX8MP%20Without%20Prior%20Boot%20%E2%80%93%20Why%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2104676%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3ENo%2C%20you%20could%20refer%20the%20description%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22June_Lu_1-1748308733817.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22June_Lu_1-1748308733817.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F339780i965B42FB46CF95BA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22June_Lu_1-1748308733817.png%22%20alt%3D%22June_Lu_1-1748308733817.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2104174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Fails%20to%20Connect%20on%20i.MX8MP%20Without%20Prior%20Boot%20%E2%80%93%20Why%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2104174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHey%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20reply%2C%20but%20it%20did%20not%20answer%20my%20question.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20connect%20with%20JTAG%20without%20prior%20boot%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2102251%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Fails%20to%20Connect%20on%20i.MX8MP%20Without%20Prior%20Boot%20%E2%80%93%20Why%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2102251%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSPAN%3EPlease%20refer%20to%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14120.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%3EAN14120.pdf%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%2C%20Debugging%20Cortex-M%20with%20VS%20Code%20on%20i.MX%208M%2C%20i.MX%208ULP%2C%20and%20i.MX%209%20to%20do%20the%20debug.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E