<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issues using JTAG and SJC on the i.MX RT1020 EVK in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943376#M4099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="344124" data-username="henrique@darkglass.com" href="https://community.nxp.com/people/henrique@darkglass.com"&gt;Henrique Nogueira&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I will test the detail on my side, I need more time, after I test it, I will give you the feedback, please keep patient,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2019 10:27:16 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2019-09-05T10:27:16Z</dc:date>
    <item>
      <title>Issues using JTAG and SJC on the i.MX RT1020 EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943375#M4098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My main goal is&amp;nbsp;to test out the secure JTAG features with the&amp;nbsp;&lt;SPAN style="color: #4a4a4d; background-color: #ffffff; font-size: 16px;"&gt;i.MX RT1020 EVK board. I'm currently using the JLink Base debugging probe with the 20 pin JTAG connector, and I also disconnected the J28 and J27 jumpers.&lt;BR /&gt;&lt;BR /&gt;I started by setting the&amp;nbsp;&lt;/SPAN&gt; &lt;EM&gt;DAP_SJC_SWD_SEL&lt;/EM&gt; &lt;SPAN style="color: #4a4a4d; background-color: #ffffff; font-size: 16px;"&gt;fuse (0x460[19]) to set the debug access port (DAP) to JTAG mode, and keeping the JTAG_MOD line pulled down as default.&amp;nbsp;After that, the JTAG interface appeared not to work until I reduced the interface speed by a lot (around 200kHz).&lt;BR /&gt;&lt;BR /&gt; This is what I get when I try to connect using Jlink.exe at different speeds:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; color: #4a4a4d; font-size: 16px; "&gt;at 4000 kHz (./jlink.exe -device MIMXRT1021DAG5A -if JTAG -speed 4000 -autoconnect 1 -JTAGConf -1,-1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px; text-align: left;"&gt;&lt;SPAN style="color: #4a4a4d; background-color: #ffffff; font-size: 16px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Connecting to target via JTAG&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFF80000003FF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFF80000003FF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFF000000007F&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFF80000003FF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Cannot connect to target.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px; text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;STRONG style="background-color: #ffffff; color: #4a4a4d; font-size: 16px; "&gt;at 400kHz (./jlink.exe -device MIMXRT1021DAG5A -if JTAG -speed &lt;STRONG style="background-color: #ffffff; color: #4a4a4d; font-size: 16px; "&gt;400&lt;/STRONG&gt; -autoconnect 1 -JTAGConf -1,-1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN style="color: #4a4a4d; background-color: #ffffff; font-size: 16px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Connecting to target via JTAG&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x03&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt; #0 Id: 0x0FA024FF, IRLen: 04, Unknown device&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x03&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt; #0 Id: 0x0FA024FF, IRLen: 04, Unknown device&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;****** Error: CPU-TAP not found in JTAG chain&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;TotalIRLen = 4, IRPrint = 0x03&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt; #0 Id: 0x0FA024FF, IRLen: 04, Unknown device&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x03&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt; #0 Id: 0x0FA024FF, IRLen: 04, Unknown device&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;****** Error: CPU-TAP not found in JTAG chain&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Cannot connect to target.&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;STRONG style="background-color: #ffffff; color: #4a4a4d; font-size: 16px; "&gt;at 100kHz (./jlink.exe -device MIMXRT1021DAG5A -if JTAG -speed 100 -autoconnect 1 -JTAGConf -1,-1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left; padding-left: 30px;"&gt;&lt;SPAN style="color: #4a4a4d; background-color: #ffffff; font-size: 16px;"&gt;Connecting to target via JTAG&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x01&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt; #0 Id: 0x0BA02477, IRLen: 04, CoreSight JTAG-DP&lt;BR /&gt;Scanning AP map to find all available APs&lt;BR /&gt;AP[1]: Stopped AP scan as end of AP map has been reached&lt;BR /&gt;AP[0]: AHB-AP (IDR: 0x04770041)&lt;BR /&gt;Iterating through AP map to find AHB-AP to use&lt;BR /&gt;AP[0]: Core found&lt;BR /&gt;AP[0]: AHB-AP ROM base: 0xE00FD000&lt;BR /&gt;CPUID register: 0x411FC271. Implementer code: 0x41 (ARM)&lt;BR /&gt;Found Cortex-M7 r1p1, Little endian.&lt;BR /&gt;FPUnit: 8 code (BP) slots and 0 literal slots&lt;BR /&gt;CoreSight components:&lt;BR /&gt;ROMTbl[0] @ E00FD000&lt;BR /&gt;ROMTbl[0][0]: E00FE000, CID: B105100D, PID: 000BB4C8 ROM Table&lt;BR /&gt;ROMTbl[1] @ E00FE000&lt;BR /&gt;ROMTbl[1][0]: E00FF000, CID: B105100D, PID: 000BB4C7 ROM Table&lt;BR /&gt;ROMTbl[2] @ E00FF000&lt;BR /&gt;ROMTbl[2][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7&lt;BR /&gt;ROMTbl[2][1]: E0001000, CID: B105E00D, PID: 000BB002 DWT&lt;BR /&gt;ROMTbl[2][2]: E0002000, CID: B105E00D, PID: 000BB00E FPB-M7&lt;BR /&gt;ROMTbl[2][3]: E0000000, CID: B105E00D, PID: 000BB001 ITM&lt;BR /&gt;ROMTbl[1][1]: E0041000, CID: B105900D, PID: 001BB975 ETM-M7&lt;BR /&gt;ROMTbl[1][2]: E0042000, CID: B105900D, PID: 004BB906 CTI&lt;BR /&gt;ROMTbl[0][1]: E0040000, CID: B105900D, PID: 000BB9A9 TPIU-M7&lt;BR /&gt;ROMTbl[0][2]: E0043000, CID: B105F00D, PID: 001BB101 TSG&lt;BR /&gt;Cache: Separate I- and D-cache.&lt;BR /&gt;I-Cache L1: 16 KB, 256 Sets, 32 Bytes/Line, 2-Way&lt;BR /&gt;D-Cache L1: 16 KB, 128 Sets, 32 Bytes/Line, 4-Way&lt;BR /&gt;Cortex-M7 identified.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;However, at lower interface speeds, the debugger is running visibly slow and it's much less effective than SWD used to be. My first question is: &lt;STRONG&gt;does anyone have any idea why JTAG needs to run much slower than the SWD interface on this evk board?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #4a4a4d; background-color: #ffffff; font-size: 16px;"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #ffffff; font-size: 16px;"&gt;Afterwords, I tried testing the secure JTAG features, in particular, the&lt;/SPAN&gt; &lt;EM&gt;Secure JTAG debug authentication protocol.&amp;nbsp;&lt;/EM&gt;As mentioned in the application note&amp;nbsp;AN12419, I started by&amp;nbsp;burning the &lt;EM&gt;JTAG_SMODE&amp;nbsp;&lt;/EM&gt;efuses (0x460[23:22]) to 0b01, to set the Secure JTAG mode, and the&amp;nbsp;&lt;EM&gt;KTE&amp;nbsp;&lt;/EM&gt;efuse to 1 (0x460[26]). Then, I ran the jlinkscript mentioned in the application note and everything seems to be working as intended: I run it once to authenticate the device and then use JTAG freely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to try and streamline the approach by running the script directly from the MCUXpresso IDE. For that, I&amp;nbsp;added the authentication script path to&amp;nbsp;my project's "...Debug.Launch" configuration file (at Debugger&amp;gt;Additional Options&amp;gt;Script). Now, when I try to run a debugging session from the IDE, the script is called, I pull the MOD pin high and then low again as indicated by the pop up windows, and I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Error in final launch sequence&lt;BR /&gt;Failed to execute MI command:&lt;BR /&gt;-target-select remote localhost:2331&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Error message from debugger back end:&lt;BR /&gt;Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+&lt;BR /&gt;Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;So the second question is: &lt;STRONG&gt;Any ideas on how to make the automated Jlink authentication script work here?&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Thank you all very much for your time :smileyhappy:&lt;BR /&gt;&lt;BR /&gt;Henrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 07:04:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943375#M4098</guid>
      <dc:creator>henrique1</dc:creator>
      <dc:date>2019-09-04T07:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issues using JTAG and SJC on the i.MX RT1020 EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943376#M4099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="344124" data-username="henrique@darkglass.com" href="https://community.nxp.com/people/henrique@darkglass.com"&gt;Henrique Nogueira&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I will test the detail on my side, I need more time, after I test it, I will give you the feedback, please keep patient,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 10:27:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943376#M4099</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2019-09-05T10:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issues using JTAG and SJC on the i.MX RT1020 EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943377#M4100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="344124" data-objecttype="3" href="https://community.nxp.com/people/henrique@darkglass.com"&gt;Henrique Nogueira&lt;/A&gt; ,,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sorry for my later reply:&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;does anyone have any idea why JTAG needs to run much slower than the SWD interface on this evk board?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please remove the on board R116, then test it again, any progress?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;STRONG&gt;Any ideas on how to make the automated Jlink authentication script work here?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Could you tell me how you control the JTAG_MOD pin on your side when you use the Secure JTAG? Manually?&lt;/P&gt;&lt;P&gt;Please also give me the screenshot about the script add in the the MCUXpresso IDE.&lt;/P&gt;&lt;P&gt;Please also give me the picture about pop up windows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2019 10:07:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943377#M4100</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2019-09-12T10:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issues using JTAG and SJC on the i.MX RT1020 EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943378#M4101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry Zhou,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry about the delayed answer. I've removed the component R116 and now the JTAG interface is working as intended!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the automated Jlink authentication, I haven't been able to dedicate much time to it and replicate the problem. I will give you more information once I get back into that.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Henrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 08:40:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943378#M4101</guid>
      <dc:creator>henrique1</dc:creator>
      <dc:date>2019-09-19T08:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Issues using JTAG and SJC on the i.MX RT1020 EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943379#M4102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="344124" data-username="henrique@darkglass.com" href="https://community.nxp.com/people/henrique@darkglass.com"&gt;Henrique Nogueira,&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; Thanks for your updated information.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; OK, when you have, you can give me the detail steps to replicate the problem, then I will follow you and try to reproduce it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2019 01:58:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Issues-using-JTAG-and-SJC-on-the-i-MX-RT1020-EVK/m-p/943379#M4102</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2019-09-20T01:58:28Z</dc:date>
    </item>
  </channel>
</rss>

