<?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: S32K148 cant change FSEC byte in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K148-cant-change-FSEC-byte/m-p/1920656#M38516</link>
    <description>&lt;P&gt;Hi Daniel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. So the issue was that the linker file had been modified and so the __FlashConfig bytes were being written into a different part of memory.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Apologies for the delay in reply, and thanks for the help&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cant go into too much detail on here but suffice to say I am unable to write these bytes into 0x400.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason for attempting to modify these bytes was to stopI hope this is not beyond the scope of the question but I have two opt&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2024 15:48:50 GMT</pubDate>
    <dc:creator>Moh-Moh</dc:creator>
    <dc:date>2024-07-30T15:48:50Z</dc:date>
    <item>
      <title>S32K148 cant change FSEC byte</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-cant-change-FSEC-byte/m-p/1561357#M19127</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;So I'm having a very strange issue - I'm trying to change the FSEC in flash, and keep getting the same result (0xFE).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some background on my setup I'm:&lt;/P&gt;&lt;P&gt;Using Eclipse with the IAR compiler.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a Segger Jlink.&lt;/P&gt;&lt;P&gt;Modifying the byte in the startup_S32K148.S file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Things I've tried already:&lt;/P&gt;&lt;P&gt;1) Simply changing the FSEC byte (and backdoor comparison key) in startup_S32K148.S:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohMoh_6-1669726065693.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202104iCE3262E4C048105C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MohMoh_6-1669726065693.png" alt="MohMoh_6-1669726065693.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My FSEC byte is 0xBB (0b10111011)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohMoh_0-1669727658038.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202112i84807396599F85BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MohMoh_0-1669727658038.png" alt="MohMoh_0-1669727658038.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) I found a post stating that if I'm using the IAR compiler I need to use the "&lt;SPAN&gt;--enable_config_write" argument in my .board settings (&lt;A href="https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-IAR-Linker-file-for-initalizing-FSEC-Flash-Config-Fields/td-p/677625" target="_blank"&gt;https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-IAR-Linker-file-for-initalizing-FSEC-Flash-Config-Fields/td-p/677625&lt;/A&gt;). I've done this. Please find a snippet of&amp;nbsp;FlashS32K148.board below&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohMoh_5-1669725400205.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202102i6308C2A533FAFE33/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MohMoh_5-1669725400205.png" alt="MohMoh_5-1669725400205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gets used by S32K148.i79 via the flash loader in Eclipse. Please find below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohMoh_4-1669725063352.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202101iC06BE0D5F36126DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MohMoh_4-1669725063352.png" alt="MohMoh_4-1669725063352.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) I also read that I need to use the (allow security) variant of my board when debugging with SEGGER (&lt;A href="https://wiki.segger.com/S32Kxxx" target="_blank"&gt;https://wiki.segger.com/S32Kxxx&lt;/A&gt;). Again I've done this. :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohMoh_1-1669724452115.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202098i1146DB0B9EECF692/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MohMoh_1-1669724452115.png" alt="MohMoh_1-1669724452115.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After modifying these settings I'm still getting 0xFE returned from FTFC-&amp;gt;FSEC&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohMoh_7-1669726169840.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202105iA2810275889325B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MohMoh_7-1669726169840.png" alt="MohMoh_7-1669726169840.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MohMoh_9-1669726257095.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202107i30228B5E737AFCF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MohMoh_9-1669726257095.png" alt="MohMoh_9-1669726257095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;0xFE is the default value for this register. Any guidance on what am I missing would be very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moh&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:18:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-cant-change-FSEC-byte/m-p/1561357#M19127</guid>
      <dc:creator>Moh-Moh</dc:creator>
      <dc:date>2022-11-29T13:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 cant change FSEC byte</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-cant-change-FSEC-byte/m-p/1562023#M19152</link>
      <description>&lt;P&gt;Hi Moh,&lt;/P&gt;
&lt;P&gt;Do you have any other debugger?&lt;/P&gt;
&lt;P&gt;Or have you tried loading the binary using j-link commander, for example?&lt;/P&gt;
&lt;P&gt;If you then see the same result, the issue would be in the IAR and not with the debugger.&lt;/P&gt;
&lt;P&gt;In that case I would recommend contacting IAR Systems support.&lt;/P&gt;
&lt;P&gt;Have you followed all the steps in the workbench, including the Overwrite default .board option?&lt;/P&gt;
&lt;P&gt;The FSEC register is loaded from the FSEC byte at 0x400 after a reset only, I would rather check the memory itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 12:44:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-cant-change-FSEC-byte/m-p/1562023#M19152</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-11-30T12:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 cant change FSEC byte</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-cant-change-FSEC-byte/m-p/1920656#M38516</link>
      <description>&lt;P&gt;Hi Daniel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. So the issue was that the linker file had been modified and so the __FlashConfig bytes were being written into a different part of memory.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Apologies for the delay in reply, and thanks for the help&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cant go into too much detail on here but suffice to say I am unable to write these bytes into 0x400.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason for attempting to modify these bytes was to stopI hope this is not beyond the scope of the question but I have two opt&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 15:48:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-cant-change-FSEC-byte/m-p/1920656#M38516</guid>
      <dc:creator>Moh-Moh</dc:creator>
      <dc:date>2024-07-30T15:48:50Z</dc:date>
    </item>
  </channel>
</rss>

