<?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 store data in flash memory in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1523590#M21990</link>
    <description>&lt;P&gt;hello, i have a MPC5748G microcontroller. i just want to know how can i store data or an array in its flash memory. if you can please suggest some example codes i would really appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:35:10 GMT</pubDate>
    <dc:creator>turkmani_11</dc:creator>
    <dc:date>2022-09-16T10:35:10Z</dc:date>
    <item>
      <title>store data in flash memory</title>
      <link>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1523590#M21990</link>
      <description>&lt;P&gt;hello, i have a MPC5748G microcontroller. i just want to know how can i store data or an array in its flash memory. if you can please suggest some example codes i would really appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:35:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1523590#M21990</guid>
      <dc:creator>turkmani_11</dc:creator>
      <dc:date>2022-09-16T10:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: store data in flash memory</title>
      <link>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1523750#M21994</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use SDK, take a look at these examples:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;c:\NXP\S32DS_Power_v2.1\S32DS\software\S32_SDK_S32PA_RTM_3.0.3\examples\MPC5748G\demo_apps\eeprom_emulation\&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;c:\NXP\S32DS_Power_v2.1\S32DS\software\S32_SDK_S32PA_RTM_3.0.3\examples\MPC5748G\driver_examples\system\flash_program_erase\&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation can be found here:&lt;/P&gt;
&lt;P&gt;c:\NXP\S32DS_Power_v2.1\S32DS\software\S32_SDK_S32PA_RTM_3.0.3\doc\S32SDK_MPC5748G_UserManual.pdf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don’t use SDK, here’s an example which does not use drivers:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-Flash-RW/ta-p/1123178" target="_blank"&gt;https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-Flash-RW/ta-p/1123178&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here’s an example which uses older SSD flash drivers:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-Flash-RW-SSD/ta-p/1129258" target="_blank"&gt;https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-Flash-RW-SSD/ta-p/1129258&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SSD flash driver can be downloaded here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=C55_NVM_SSD" target="_blank"&gt;https://www.nxp.com/webapp/Download?colCode=C55_NVM_SSD&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Emulation EEPROM driver can be downloaded here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=MPC5XXX_EEE_DRIVER" target="_blank"&gt;https://www.nxp.com/webapp/Download?colCode=MPC5XXX_EEE_DRIVER&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But notice that SDK is preferred. These two drivers above are not maintained anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 18:39:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1523750#M21994</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2022-09-16T18:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: store data in flash memory</title>
      <link>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1523860#M21998</link>
      <description>&lt;P&gt;ok im using the example code (&lt;/P&gt;&lt;P&gt;If you don’t use SDK, here’s an example which does not use drivers:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-Flash-RW/ta-p/1123178" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-Flash-RW/ta-p/1123178&lt;/A&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;i have written the following code:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//unlock mid block 0x00FB_8000 - 0x00FB_FFFF&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.LOCK0.R &amp;amp;= 0xFFFFFDFF;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//erase the mid block&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.ERS = 1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.SEL0.R = 0x00000200; //select the mid block&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;*(unsigned int*)0x00FB8000 = 0xFFFFFFFF; //interlock write&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.EHV = 1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;while(C55FMC.MCR.B.DONE == 0);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.EHV = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.ERS = 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//program one page in the mid block&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.PGM = 1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;*(unsigned int*)0x00FB8000 = 0x11111111; //interlock write&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.EHV = 1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;while(C55FMC.MCR.B.DONE == 0);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.EHV = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C55FMC.MCR.B.PGM = 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;i have nothing changed in the memory as follows&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194017i8DAB0A54C59072D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2022 11:37:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1523860#M21998</guid>
      <dc:creator>turkmani_11</dc:creator>
      <dc:date>2022-09-18T11:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: store data in flash memory</title>
      <link>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1525007#M22009</link>
      <description>&lt;P&gt;This code works as expected, I tested it.&lt;/P&gt;
&lt;P&gt;Make sure that the data cache is either disabled or that it is invalidated after these flash operations.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 11:46:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/store-data-in-flash-memory/m-p/1525007#M22009</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2022-09-20T11:46:11Z</dc:date>
    </item>
  </channel>
</rss>

