<?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: Use the internal flash to save data at runtime with MCUXpresso in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1401751#M62269</link>
    <description>&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;That´s works fine. Simpler than I thought. I was using&amp;nbsp;&lt;SPAN&gt;IDE 11.4.1 and jut moved to&amp;nbsp;IDE 11.5.0. Both working fine. For some reason using IDE 11.4.1, if I do not reduce the Flash size the appliction was mass erasing the memory prior debugging. With IDE 11.5.0, either reducing the flash size or keep it untouched the last sectors are preserved from one debug session to another.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AndreVB&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 13:25:16 GMT</pubDate>
    <dc:creator>AndreVB</dc:creator>
    <dc:date>2022-01-19T13:25:16Z</dc:date>
    <item>
      <title>Use the internal flash to save data at runtime with MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1399757#M62246</link>
      <description>&lt;P&gt;Hi NXP Team,&lt;/P&gt;&lt;P&gt;I have an KINETIS-based application being developed with MCUXpresso (&lt;SPAN&gt;MCU-Link debug probe&lt;/SPAN&gt;). Of 64k FLASH I use 4k to save data. FLASH_LOWER for the code and FLASH_HIGHER to save data (see next image). Two questions:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Whenever I debug the whole Flash is erase. But I want to preseve FLASH_UPPER (my data) during the debbuging process. How can I do that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndreVB_0-1642355149541.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/167709i4E2D65F304CD2E12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndreVB_0-1642355149541.png" alt="AndreVB_0-1642355149541.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; In the final product, I want to protect my code (FLASH_LOWER). Don' t care about FLASH_LOWER (my data). How do I do that?&lt;/P&gt;&lt;P&gt;I have read these articles:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;17.8.2 Kinetis MCUs – Flash Config Blocks&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&lt;A href="https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/Relocating-Code-and-Data-Using-the-MCUXpresso-IDE/ta-p/1103719" target="_blank"&gt;https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/Relocating-Code-and-Data-Using-the-MCUXpresso-IDE/ta-p/1103719&lt;/A&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&lt;A href="https://mcuoneclipse.com/2014/05/31/configuration-data-using-the-internal-flash-instead-of-an-external-eeprom/" target="_blank"&gt;https://mcuoneclipse.com/2014/05/31/configuration-data-using-the-internal-flash-instead-of-an-external-eeprom/&lt;/A&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I’ve looked through the documentation but I haven’t understood how I could use the MCUXpresso IDE to configure the flash accordingly. Any help is very welcome.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Andre.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 18:01:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1399757#M62246</guid>
      <dc:creator>AndreVB</dc:creator>
      <dc:date>2022-01-16T18:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use the internal flash to save data at runtime with MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1400225#M62250</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189151"&gt;@AndreVB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The MCUXpresso IDE will only erase erase affected sector when downloading code by default. You data will not be erased if the last sector is not overlapped by code. If you want to erase everything when programming, you can set in GUI Flash Tool.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingpan_0-1642414699180.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/167829i36FA8456A3C95D0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingpan_0-1642414699180.png" alt="jingpan_0-1642414699180.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 10:18:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1400225#M62250</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-01-17T10:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use the internal flash to save data at runtime with MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1400274#M62252</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189151"&gt;@AndreVB&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;About 1): I don't see (at least with my IDE 11.4.1) the the LinkServer connection is erasing first all memory. I do have in many projects reserved a region at the end of the flash. But I simply reduce the flash size in the MCU settings:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ErichS_0-1642419844457.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/167839iAED3A0D5EF40577F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ErichS_0-1642419844457.png" alt="ErichS_0-1642419844457.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I can confirm that way for all debug connections I use (Segger J-Link, LinkServer McuLink &amp;amp; P&amp;amp;E Multilink) the FLASH that way does not get touched, showing with MinINI and McuFlash below (from &lt;A href="https://mcuoneclipse.com/2021/12/19/key-value-pairs-in-flash-memory-file-system-less-minini/" target="_blank"&gt;https://mcuoneclipse.com/2021/12/19/key-value-pairs-in-flash-memory-file-system-less-minini/&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ErichS_1-1642419986116.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/167840i712D4162B3AB9EF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ErichS_1-1642419986116.png" alt="ErichS_1-1642419986116.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Maybe the thing you see is because you are using an older IDE? I remember (I think it was starting with 11.4) the LinkServer flashing has been optimized, not programming untouched sectors by default (something what J-Link always did, and P&amp;amp;E does now too, at least when I last checked). You could verify the flash operations in the Console view:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ErichS_2-1642420220729.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/167842iB84FCEDAAC61E5DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ErichS_2-1642420220729.png" alt="ErichS_2-1642420220729.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;About 2): on the KL25Z there are the FPROTx registers which can be used to protect each of the 32 regions of the flash memory (see chapter 27.4.1 Flash Protection) in the KL25Z reference manual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 11:54:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1400274#M62252</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2022-01-17T11:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Use the internal flash to save data at runtime with MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1400278#M62253</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61241"&gt;@jingpan&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;If I'm not wrong: the settings you show are not used for the download/programming/debugging operation. They are only used if you press that 'Run' button in that dialog, otherwise I think these settings are ignored.&lt;/P&gt;&lt;P&gt;Let me know if I have that wrong?&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 11:55:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1400278#M62253</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2022-01-17T11:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use the internal flash to save data at runtime with MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1401751#M62269</link>
      <description>&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;That´s works fine. Simpler than I thought. I was using&amp;nbsp;&lt;SPAN&gt;IDE 11.4.1 and jut moved to&amp;nbsp;IDE 11.5.0. Both working fine. For some reason using IDE 11.4.1, if I do not reduce the Flash size the appliction was mass erasing the memory prior debugging. With IDE 11.5.0, either reducing the flash size or keep it untouched the last sectors are preserved from one debug session to another.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AndreVB&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 13:25:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Use-the-internal-flash-to-save-data-at-runtime-with-MCUXpresso/m-p/1401751#M62269</guid>
      <dc:creator>AndreVB</dc:creator>
      <dc:date>2022-01-19T13:25:16Z</dc:date>
    </item>
  </channel>
</rss>

