<?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>S32KのトピックRe: S32K148 Unsecurity</title>
    <link>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1199127#M9247</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i've facing the very same problem.&lt;BR /&gt;&lt;BR /&gt;Suddenly S32DS started to give a pop-up to unsecure the device.&lt;BR /&gt;I've tried many things, emergency recover with kinetis, nothing&lt;BR /&gt;Changed my openSDA from PEMicro to Segger&lt;BR /&gt;Tried to do this mass erase j-link and the suggest and after that I can't connect or I'm doing wrongly&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Type "connect" to establish a target connection, '?' for help
J-Link&amp;gt;device S32K144
J-Link&amp;gt;connect
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF&amp;gt;S
Specify target interface speed [kHz]. &amp;lt;Default&amp;gt;: 4000 kHz
Speed&amp;gt;
Device "S32K144" selected.


Connecting to target via SWD
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP

****** Error: Could not find core in Coresight setup

InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP

****** Error: Could not find core in Coresight setup

Cannot connect to target.
J-Link&amp;gt;r0
J-Link&amp;gt;swdwritedp 2,0x01000000
Write DP register 2 = 0x01000000
J-Link&amp;gt;swdreadap 0
Read AP register 0 = 0x00000000
J-Link&amp;gt;swdreadap 0
Read AP register 0 = 0x00000037
J-Link&amp;gt;swdreadap 1
Read AP register 1 = 0x00000037
J-Link&amp;gt;swdreadap 1
Read AP register 1 = 0x00000000
J-Link&amp;gt;unlock Kinetis
Found SWD-DP with ID 0x2BA01477
Unlocking device...O.K.
J-Link&amp;gt;swdwriteap 1,0x1
Write AP register 1 = 0x00000001
J-Link&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 14 Dec 2020 19:10:22 GMT</pubDate>
    <dc:creator>rvalente</dc:creator>
    <dc:date>2020-12-14T19:10:22Z</dc:date>
    <item>
      <title>S32K148 Unsecurity</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1176388#M8641</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I found my s32k148 chip is security.I reset the chip and use j-link commander to unlock kinetis,but it doesn't work.How can I unsecure the chip? Expect your answer.Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128792i8B75B0EE21B47FB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="11.PNG" alt="11.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="22.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128793iBE8D1C1D4F1D8E82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="22.PNG" alt="22.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 05:42:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1176388#M8641</guid>
      <dc:creator>zhigang</dc:creator>
      <dc:date>2020-11-02T05:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 Unsecurity</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1176957#M8659</link>
      <description>&lt;P&gt;Hi&amp;nbsp;zhigang,&lt;/P&gt;
&lt;P&gt;Would you please show the image of "unlock kinetis" in J-Link Commander?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JLink Commander.png" style="width: 637px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128885iE01BFC9C805C3F38/image-size/large?v=v2&amp;amp;px=999" role="button" title="JLink Commander.png" alt="JLink Commander.png" /&gt;&lt;/span&gt;&lt;BR /&gt;If &lt;STRONG&gt;Mass erase&lt;/STRONG&gt; is enabled, you should be able to "&lt;STRONG&gt;unlock kinetis&lt;/STRONG&gt;" in J-Link Commander.&lt;/P&gt;
&lt;P&gt;Have you modify the value of &lt;STRONG&gt;Flash Configuration&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flash Configuration.png" style="width: 847px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128886iD9E3B15292AAD5B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Configuration.png" alt="Flash Configuration.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please check the connection between S32K148 and J-Link. Are you using S32K148EVB or custom board?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="S32K148 Debugg Connector.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128887i989AE6459C712B10/image-size/large?v=v2&amp;amp;px=999" role="button" title="S32K148 Debugg Connector.png" alt="S32K148 Debugg Connector.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&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;- 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;</description>
      <pubDate>Tue, 03 Nov 2020 04:12:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1176957#M8659</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2020-11-03T04:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 Unsecurity</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1177129#M8663</link>
      <description>&lt;P&gt;Hi,Robin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; First of all, I finished the "unlock kinetis",and it showed "OK".Then, I do not know the &lt;STRONG&gt;Mass erase&lt;/STRONG&gt; is enabled or not.If &lt;STRONG&gt;Mass erase&lt;/STRONG&gt; is disabled,what should I do.At last, the connection between S32K148 and J-Link is OK,and the schematic diagram is the same&amp;nbsp;as yours.Looking forward to your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Zhigang&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 08:51:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1177129#M8663</guid>
      <dc:creator>zhigang</dc:creator>
      <dc:date>2020-11-03T08:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 Unsecurity</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1177657#M8682</link>
      <description>&lt;P&gt;Could you please try to read the MDM_AP status and control registers first.&lt;BR /&gt;Use J-link commander and these commands:&lt;/P&gt;
&lt;PRE class="line-numbers  language-none"&gt;&lt;CODE&gt;J-Link&amp;gt;r0                      // pull reset pin low

J-Link&amp;gt;swdwritedp 2,0x01000000 // MDM_AP status register

J-Link&amp;gt;swdreadap 0      // Read MDM_AP status register
J-Link&amp;gt;swdreadap 0      // Read MDM_AP status register (has to be done 2x) Flash memory ready and Mass erase enable bits should be set

J-Link&amp;gt;swdreadap 1      // Read MDM_AP control register
J-Link&amp;gt;swdreadap 1      // Read MDM_AP control register (has to be done 2x) 

J-Link&amp;gt;unlock Kinetis   // Erase and unsecure the MCU

//J-Link&amp;gt;swdwriteap 1,0x1 // Launch mass erase directly, set Control[0] = 1
&amp;nbsp;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For more information about the register please refer to &lt;EM&gt;Section&amp;nbsp;56.6 MDM-AP status and control registers&lt;/EM&gt;, &lt;A id="relatedDocsClick_1" href="https://www.nxp.com/webapp/Download?colCode=S32K1XXRM" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;S32K1xx MCU Family - Reference Manual&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;SUP&gt;(REV 12.1)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SUP&gt;&lt;I class="icon-lock4"&gt;&lt;/I&gt;.&lt;/P&gt;
&lt;P&gt;You should be able to see if the MCU secured (Status[2]), if the Mass Erase operation is enabled (Status[5]) and if the Flash memory is ready (Status[1]).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="58.6.2 MDM-AP Status Register.png" style="width: 894px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129029i8B700DDF32B73D28/image-size/large?v=v2&amp;amp;px=999" role="button" title="58.6.2 MDM-AP Status Register.png" alt="58.6.2 MDM-AP Status Register.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 03:52:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1177657#M8682</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2020-11-04T03:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 Unsecurity</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1182938#M8811</link>
      <description>&lt;P&gt;Hi Robin_Shen,&lt;/P&gt;&lt;P&gt;Below is my jlink trace.But it doesn't work.&lt;/P&gt;&lt;P&gt;J-Link&amp;gt;R0&lt;BR /&gt;J-Link&amp;gt;swdwritedp 2, 0x1000000&lt;BR /&gt;Write DP register 2 = 0x01000000&lt;BR /&gt;J-Link&amp;gt;swdreadap 0&lt;BR /&gt;Read AP register 0 = 0x00000000&lt;BR /&gt;J-Link&amp;gt;swdreadap 0&lt;BR /&gt;Read AP register 0 = 0x00000037&lt;BR /&gt;J-Link&amp;gt;swdreadap 1&lt;BR /&gt;Read AP register 1 = 0x00000037&lt;BR /&gt;J-Link&amp;gt;swdreadap 1&lt;BR /&gt;Read AP register 1 = 0x00000000&lt;BR /&gt;J-Link&amp;gt;unlock Kinetis&lt;BR /&gt;Found SWD-DP with ID 0x2BA01477&lt;BR /&gt;Unlocking device...O.K.&lt;BR /&gt;J-Link&amp;gt;swdwriteap 1,0x1&lt;BR /&gt;Write AP register 1 = 0x00000001&lt;BR /&gt;J-Link&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 07:38:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1182938#M8811</guid>
      <dc:creator>zhigang</dc:creator>
      <dc:date>2020-11-13T07:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 Unsecurity</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1199127#M9247</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i've facing the very same problem.&lt;BR /&gt;&lt;BR /&gt;Suddenly S32DS started to give a pop-up to unsecure the device.&lt;BR /&gt;I've tried many things, emergency recover with kinetis, nothing&lt;BR /&gt;Changed my openSDA from PEMicro to Segger&lt;BR /&gt;Tried to do this mass erase j-link and the suggest and after that I can't connect or I'm doing wrongly&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Type "connect" to establish a target connection, '?' for help
J-Link&amp;gt;device S32K144
J-Link&amp;gt;connect
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF&amp;gt;S
Specify target interface speed [kHz]. &amp;lt;Default&amp;gt;: 4000 kHz
Speed&amp;gt;
Device "S32K144" selected.


Connecting to target via SWD
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP

****** Error: Could not find core in Coresight setup

InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while halting CPU.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP

****** Error: Could not find core in Coresight setup

Cannot connect to target.
J-Link&amp;gt;r0
J-Link&amp;gt;swdwritedp 2,0x01000000
Write DP register 2 = 0x01000000
J-Link&amp;gt;swdreadap 0
Read AP register 0 = 0x00000000
J-Link&amp;gt;swdreadap 0
Read AP register 0 = 0x00000037
J-Link&amp;gt;swdreadap 1
Read AP register 1 = 0x00000037
J-Link&amp;gt;swdreadap 1
Read AP register 1 = 0x00000000
J-Link&amp;gt;unlock Kinetis
Found SWD-DP with ID 0x2BA01477
Unlocking device...O.K.
J-Link&amp;gt;swdwriteap 1,0x1
Write AP register 1 = 0x00000001
J-Link&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 14 Dec 2020 19:10:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-Unsecurity/m-p/1199127#M9247</guid>
      <dc:creator>rvalente</dc:creator>
      <dc:date>2020-12-14T19:10:22Z</dc:date>
    </item>
  </channel>
</rss>

