<?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: Jtag flashing issue: Not able to flash device, Erase/read back works sometime. in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1831984#M33243</link>
    <description>&lt;P&gt;Hello there Geeks,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was facing flash protection issues, I was able to understand the root cause.&amp;nbsp;&lt;BR /&gt;in earlier problems mass erase was enabled and protection was set.&amp;nbsp;&lt;BR /&gt;So I was able to unsecure the device using Jlink command line interface and procedure shown in one thread of NXP community. I made one document of the process and attached here.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have attached document please go through it. it is showing my understanding on this issue and how to recover. please let me know if anything is wrong in my understanding.&amp;nbsp;&lt;BR /&gt;Now I'm having device in below state:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It says :&lt;STRONG&gt;&lt;EM&gt;Protection is set but mass erase is disabled. J-Link cannot unprotect the device.&lt;/EM&gt;&lt;/STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_0-1710850883555.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/269256i4A05D62E3D2D378C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_0-1710850883555.png" alt="Ankit_Rana_0-1710850883555.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Device went into this state while working on boot loader and application.&amp;nbsp;&lt;BR /&gt;(as mentioned in attached document I'm not modifying startup file/.S file) , So all flash configuration fields are as it is. startup file of boot loader and startup file of application is not modified at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_1-1710851102399.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/269258i3B7AB6F99914D410/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_1-1710851102399.png" alt="Ankit_Rana_1-1710851102399.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please let me know if there is any way out and get the device back in normal state.&amp;nbsp;&lt;BR /&gt;Please go through attached document and&lt;STRONG&gt; let me know what I should take care so other device will not get damaged.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 11:28:36 GMT</pubDate>
    <dc:creator>Ankit_Rana</dc:creator>
    <dc:date>2024-03-20T11:28:36Z</dc:date>
    <item>
      <title>Jtag flashing issue: Not able to flash device, Erase/read back works sometime.</title>
      <link>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1788092#M30609</link>
      <description>&lt;P&gt;Hi Support team,&lt;BR /&gt;&lt;BR /&gt;Setup environment:&amp;nbsp;&lt;BR /&gt;Using s32k144 MCU with JTAG and Jflash tool.&amp;nbsp;&lt;BR /&gt;Able to connect with the MCU. connections are fine. having two device. In one everything is working.&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Before erasing we unsecure the device and performed mass erase. see the attached snip.&lt;/STRONG&gt;&lt;BR /&gt;in second device consider below behavior:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;flash operation:&lt;BR /&gt;Erase/read chip or sector -&amp;gt; working only when after connecting with MCU immediately erase,&amp;nbsp;&lt;BR /&gt;program and verifying -&amp;gt;&amp;nbsp;not working (If we fire only program command, pop for success is coming, when read the chip everything is FF only. not flashing)&lt;BR /&gt;&lt;BR /&gt;please go through the logs attached here. showcases the connect, erase, program and verify and read back operation logs.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Suspect list:&amp;nbsp;&lt;BR /&gt;As whole chip is erased, flash configuration is 0xFF(so the device is unsecure), interrupt/vector table address are 0xff, text segment or code flash is 0xff.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_0-1705068118117.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258017iCBF488B5A8CFADE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_0-1705068118117.png" alt="Ankit_Rana_0-1705068118117.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried to write the configuration registers manually using jlink commander CLI interface, using memory write and read commands as shown below. values of flash configuration registers are taken from .s (startup file)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* Flash Configuration */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.section .FlashConfig, "a"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.long 0xFFFFFFFF /* 8 bytes backdoor comparison key */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.long 0xFFFFFFFF /* */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.long 0xFFFFFFFF /* 4 bytes program flash protection bytes */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.long &lt;STRONG&gt;0xFFFF7FFE&lt;/STRONG&gt; /* FDPROT:FEPROT:FOPT:FSEC(0xFE = unsecured) */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;.text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;.thumb&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manual_configuartion_reg_set.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258018iD6532F2BAB603C02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="manual_configuartion_reg_set.PNG" alt="manual_configuartion_reg_set.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;MDM-AP status register value:&amp;nbsp;&lt;STRONG&gt;0x0001003B. Please interpret the value and help me to understand if the device can be fixed.&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;Please provide your inputs to find the root cause of the issue and fix the device.&amp;nbsp;&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/44300"&gt;@Jiri&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/13026"&gt;@ZhangJennie&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/1452"&gt;@BlackNight&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/57959"&gt;@Robin_Shen&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/72088"&gt;@mariuslucianand&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61241"&gt;@jingpan&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/40101"&gt;@jay_heng&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/167559"&gt;@Alexis_A&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Attached Jflash error snips below and Jlash tool logs.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_1-1705069884523.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258021i0E2247C73AF4A78B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_1-1705069884523.png" alt="Ankit_Rana_1-1705069884523.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Performed unlocking sequence:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_2-1705070432689.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258024i0C02BFE2AA616CD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_2-1705070432689.png" alt="Ankit_Rana_2-1705070432689.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="erase_working.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258012iD15DBA22A9FE9AF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="erase_working.PNG" alt="erase_working.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fail_to_program.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258013i84D1A0BE76DB40F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fail_to_program.PNG" alt="fail_to_program.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="faiuled_to_target_program.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258014iA90F81517BF8D752/image-size/medium?v=v2&amp;amp;px=400" role="button" title="faiuled_to_target_program.PNG" alt="faiuled_to_target_program.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="flashing_issue.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258015i38AAE6B4613CE47D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="flashing_issue.PNG" alt="flashing_issue.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 14:52:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1788092#M30609</guid>
      <dc:creator>Ankit_Rana</dc:creator>
      <dc:date>2024-01-12T14:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Jtag flashing issue: Not able to flash device, Erase/read back works sometime.</title>
      <link>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1788243#M30614</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227492"&gt;@Ankit_Rana&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;As discussed in this (&lt;A href="https://community.nxp.com/t5/S32K/How-to-unlock-S32K148-Chip/m-p/1204055" target="_blank"&gt;Solved: Re: How to unlock S32K148 Chip - NXP Community&lt;/A&gt;) community post,&amp;nbsp;&lt;SPAN&gt;writing to this register without taking care of the bits written will lock the MCU without the recovery option, please try these steps as well.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You can look into this in-depth guide for the S32K1:&amp;nbsp;&lt;A href="https://mp.weixin.qq.com/s?__biz=MzI0MDk0ODcxMw==&amp;amp;mid=2247485716&amp;amp;idx=1&amp;amp;sn=979631aa2385a4e3c7651ee75ee252b4&amp;amp;chksm=e9124d92de65c484f1cfec7de451958cfd5cf818c46a4f71a7d3dd8a522af229c5a18aad58ff&amp;amp;scene=21#wechat_redirect" target="_blank"&gt;S32K1xx Series MCU Application Guide - Chip Lockup Reset Cause Analysis and Recovery Methods Explained in detail&lt;/A&gt;&amp;nbsp;for steps in how to&amp;nbsp;&lt;SPAN&gt;determine whether the MCU can be unlocked or restored, as well as&amp;nbsp;MDM-AP Status registers explanations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Julián&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 22:04:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1788243#M30614</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2024-01-12T22:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Jtag flashing issue: Not able to flash device, Erase/read back works sometime.</title>
      <link>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1789949#M30731</link>
      <description>&lt;P&gt;Hi Support team,&lt;BR /&gt;&lt;BR /&gt;I was able to resolve the issue and was able to flash the chip. It was working as expected.&amp;nbsp;&lt;BR /&gt;But again, when I tried it is giving the same readout protection set error.&lt;BR /&gt;&lt;BR /&gt;I have read MDM_AP status register. the value is 0x00000037. as per the status register table.&amp;nbsp;&lt;BR /&gt;bit_0(flash memory mass erase ack) is &lt;STRONG&gt;SET&lt;BR /&gt;&lt;/STRONG&gt;bit_1(flash memory ready) is &lt;STRONG&gt;SET&lt;BR /&gt;&lt;/STRONG&gt;bit_2(system security) is &lt;STRONG&gt;SET&lt;BR /&gt;&lt;/STRONG&gt;bit_3(system reset ) is 0&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;bit_5 (mass erase enable) is SET.&amp;nbsp;&lt;BR /&gt;bit_6(back door access key) is 0 (disabled)&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;it seems now the security bit is set, and mass erase is not completing, it has started the mass erase operation as per bit_0.&amp;nbsp;&lt;BR /&gt;Is there any way to disable the security and do the mass erase.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_0-1705466690074.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/258509iCCF11A9CB3CE1655/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_0-1705466690074.png" alt="Ankit_Rana_0-1705466690074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 04:43:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1789949#M30731</guid>
      <dc:creator>Ankit_Rana</dc:creator>
      <dc:date>2024-01-17T04:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Jtag flashing issue: Not able to flash device, Erase/read back works sometime.</title>
      <link>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1792254#M30895</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227492"&gt;@Ankit_Rana&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Disabling security is not needed if a mass erase is requested, as invoking the mass erase will cause the entire flash to be erased even if security is enabled or regions are protected (&lt;A href="https://www.nxp.com/docs/en/application-note/AN12130.pdf?_gl=1*1s7n1qx*_ga*MTQ2ODgzMTAxNC4xNzA1NjkzODU2*_ga_WM5LE0KMSH*MTcwNTY5Mzg1Ni4xLjEuMTcwNTY5Mzk0Ny4wLjAuMA..#unique_15" target="_blank"&gt;AN12130: Production Flash Programming Best Practices for S32K1xx MCUs&lt;/A&gt;). Only situation where security enable is a problem is when mass erased is disabled and no backdoor key is set.&lt;/P&gt;
&lt;P&gt;Is mass erase not completing even when trying the "Emergency Kinetis Device Recover by Full Chip Erase" option in Debug configuration through S32DS?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1705694834560.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/259214iF55E9BBCA392C0F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_0-1705694834560.png" alt="Julin_AragnM_0-1705694834560.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 20:12:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1792254#M30895</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2024-01-19T20:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Jtag flashing issue: Not able to flash device, Erase/read back works sometime.</title>
      <link>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1831984#M33243</link>
      <description>&lt;P&gt;Hello there Geeks,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was facing flash protection issues, I was able to understand the root cause.&amp;nbsp;&lt;BR /&gt;in earlier problems mass erase was enabled and protection was set.&amp;nbsp;&lt;BR /&gt;So I was able to unsecure the device using Jlink command line interface and procedure shown in one thread of NXP community. I made one document of the process and attached here.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have attached document please go through it. it is showing my understanding on this issue and how to recover. please let me know if anything is wrong in my understanding.&amp;nbsp;&lt;BR /&gt;Now I'm having device in below state:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It says :&lt;STRONG&gt;&lt;EM&gt;Protection is set but mass erase is disabled. J-Link cannot unprotect the device.&lt;/EM&gt;&lt;/STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_0-1710850883555.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/269256i4A05D62E3D2D378C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_0-1710850883555.png" alt="Ankit_Rana_0-1710850883555.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Device went into this state while working on boot loader and application.&amp;nbsp;&lt;BR /&gt;(as mentioned in attached document I'm not modifying startup file/.S file) , So all flash configuration fields are as it is. startup file of boot loader and startup file of application is not modified at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankit_Rana_1-1710851102399.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/269258i3B7AB6F99914D410/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankit_Rana_1-1710851102399.png" alt="Ankit_Rana_1-1710851102399.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please let me know if there is any way out and get the device back in normal state.&amp;nbsp;&lt;BR /&gt;Please go through attached document and&lt;STRONG&gt; let me know what I should take care so other device will not get damaged.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 11:28:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Jtag-flashing-issue-Not-able-to-flash-device-Erase-read-back/m-p/1831984#M33243</guid>
      <dc:creator>Ankit_Rana</dc:creator>
      <dc:date>2024-03-20T11:28:36Z</dc:date>
    </item>
  </channel>
</rss>

