<?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 S32K118 D-flash and EEEPROM configuration in K32 L Series Microcontrollers</title>
    <link>https://community.nxp.com/t5/K32-L-Series-Microcontrollers/S32K118-D-flash-and-EEEPROM-configuration/m-p/2250309#M384</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am bit new to the NXP ecosystem and would desperately require help.&lt;/P&gt;&lt;P&gt;I am using the S32K118 and have been trying to use D-Flash as non volatile memory, but I can't seem to make it work which ever way I try..&lt;/P&gt;&lt;P&gt;At first I tried to partition the FlexNVM to emulate EEEPROM, but that constantly gave me ACCERR. I tried to go over all the reason for it in the datasheet, but the only one I could think of was, that the function was written to P-Flash, but had to be in RAM ("The&lt;BR /&gt;Program Partition command must not be launched from flash memory, since flash&lt;BR /&gt;memory resources are not accessible during Program Partition command execution."). I couldn't get the function to RAM either, because then I ran in to some linker problems...&lt;BR /&gt;&lt;BR /&gt;Since that didn't work I figured I'd try to just write manually to D-FLASH, but I get the MGSTAT error, which means it has not been cleared. When I tried to clear it, I get to HardFault... AI suggests that it might be the problem of not running the function from RAM again, but I can't get it to work as mentioned earilier...&lt;BR /&gt;&lt;BR /&gt;I will add my files down below and would greatly appreciate any help.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Nov 2025 09:35:23 GMT</pubDate>
    <dc:creator>HiddenSquid</dc:creator>
    <dc:date>2025-11-27T09:35:23Z</dc:date>
    <item>
      <title>S32K118 D-flash and EEEPROM configuration</title>
      <link>https://community.nxp.com/t5/K32-L-Series-Microcontrollers/S32K118-D-flash-and-EEEPROM-configuration/m-p/2250309#M384</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am bit new to the NXP ecosystem and would desperately require help.&lt;/P&gt;&lt;P&gt;I am using the S32K118 and have been trying to use D-Flash as non volatile memory, but I can't seem to make it work which ever way I try..&lt;/P&gt;&lt;P&gt;At first I tried to partition the FlexNVM to emulate EEEPROM, but that constantly gave me ACCERR. I tried to go over all the reason for it in the datasheet, but the only one I could think of was, that the function was written to P-Flash, but had to be in RAM ("The&lt;BR /&gt;Program Partition command must not be launched from flash memory, since flash&lt;BR /&gt;memory resources are not accessible during Program Partition command execution."). I couldn't get the function to RAM either, because then I ran in to some linker problems...&lt;BR /&gt;&lt;BR /&gt;Since that didn't work I figured I'd try to just write manually to D-FLASH, but I get the MGSTAT error, which means it has not been cleared. When I tried to clear it, I get to HardFault... AI suggests that it might be the problem of not running the function from RAM again, but I can't get it to work as mentioned earilier...&lt;BR /&gt;&lt;BR /&gt;I will add my files down below and would greatly appreciate any help.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 09:35:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/K32-L-Series-Microcontrollers/S32K118-D-flash-and-EEEPROM-configuration/m-p/2250309#M384</guid>
      <dc:creator>HiddenSquid</dc:creator>
      <dc:date>2025-11-27T09:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: S32K118 D-flash and EEEPROM configuration</title>
      <link>https://community.nxp.com/t5/K32-L-Series-Microcontrollers/S32K118-D-flash-and-EEEPROM-configuration/m-p/2251257#M385</link>
      <description>&lt;P&gt;First you need to perform program partition operation to configure FlexRAM/FlexNVM as you needed according AN11983, section 2.2.2.&lt;/P&gt;
&lt;P&gt;There is an example code in S32DS SDK (flash_partitioning_s32k144). It needs to be blank new device or with performed mass erase operation before programming the example code. There is no default values, this needs to be done once.&lt;/P&gt;
&lt;P&gt;You may also use example code I did in the past. It configure FlexRAM as RAM what was the intention of example code but it also sets up FlexNVM as D-flash:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K146-Set-whole-FlexRAM-as-RAM-v0-0-S32DS-ARM-2-2/ta-p/1245841" target="_blank"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K146-Set-whole-FlexRAM-as-RAM-v0-0-S32DS-ARM-2-2/ta-p/1245841&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EEPROM portion of FlexNVM will be accesses over FlexRAM memory address space.&lt;/P&gt;
&lt;P&gt;Data flash portion of FlexNVM will be accesses ordinary way i.e. reading of flash address directly and erasing/programming of flash address.&lt;/P&gt;
&lt;P&gt;Simple example how to program flash you may see for instance here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-Flash-RW-simple/ta-p/1110000" target="_blank"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-Flash-RW-simple/ta-p/1110000&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 13:10:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/K32-L-Series-Microcontrollers/S32K118-D-flash-and-EEEPROM-configuration/m-p/2251257#M385</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-11-28T13:10:51Z</dc:date>
    </item>
  </channel>
</rss>

