<?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: How to store to DFlash/EFlash memory in S32K</title>
    <link>https://community.nxp.com/t5/S32K/How-to-store-to-DFlash-EFlash-memory/m-p/866432#M3807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good question. There's a note in the RM which can be easily overlooked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61917i6DF9433708224053/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;So, if you are going to program address 0x1000_0000 then write these values to FCCOB registers:&lt;/P&gt;&lt;P&gt;FCCOB[1] = 0x80&lt;/P&gt;&lt;P&gt;FCCOB[2] = 0x00&lt;/P&gt;&lt;P&gt;FCCOB[3] = 0x00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2019 13:29:40 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2019-03-19T13:29:40Z</dc:date>
    <item>
      <title>How to store to DFlash/EFlash memory</title>
      <link>https://community.nxp.com/t5/S32K/How-to-store-to-DFlash-EFlash-memory/m-p/866431#M3806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am new to using the S32K146 board and I'm trying to store some data in the D-Flash memory. I have used the following code from the "Example_S32K144-Flash_RW_simple-S32DS12" example to erase a sector and program some data, which looks like its storing in memory successfully.&lt;/P&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;But looking at the Memory Map for the S32K146 it looks like this is storing data into the PFlash memory (0x0 - 0x03FFFFFF) with the DFlash memory starting at 0x10000000. But below the&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;FTFC-&amp;gt;FCCOB&lt;/SPAN&gt; register doesn't have a setting for the upper byte of the flash address (31:24) which would be needed to access the DFlash memory?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Any help would be much appreciated, apologies if I'm missing something obvious.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;void EraseAndProgram(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;//erase 4KB flash sector (the smallest entity that can be erased) at 0x0004_0000&lt;BR /&gt;&amp;nbsp;while((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0);&amp;nbsp;//wait if operation in progress&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FSTAT = FTFC_FSTAT_ACCERR_MASK | FTFC_FSTAT_FPVIOL_MASK;&amp;nbsp;//clear flags if set&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[3] = 0x09;&amp;nbsp;//Erase Flash Sector command (0x09)&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[2] = 0x04;&amp;nbsp;//Flash address [23:16]&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[1] = 0x00;&amp;nbsp;//Flash address [15:08]&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[0] = 0x00;&amp;nbsp;//Flash address [7:0]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;FTFC-&amp;gt;FSTAT = FTFC_FSTAT_CCIF_MASK;&amp;nbsp;//launch command&lt;BR /&gt;&amp;nbsp;while((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0);&amp;nbsp;//wait for done&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;//program phrase at address 0x0004_0000&lt;BR /&gt;&amp;nbsp;while((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0);&amp;nbsp;//wait if operation in progress&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FSTAT = FTFC_FSTAT_ACCERR_MASK | FTFC_FSTAT_FPVIOL_MASK;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[3] = 0x07;&amp;nbsp;//Program Phrase command (0x07)&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[2] = 0x04;&amp;nbsp;//Flash address [23:16]&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[1] = 0x00;&amp;nbsp;//Flash address [15:08]&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[0] = 0x00;&amp;nbsp;//Flash address [7:0]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[7] = 0xFE;&amp;nbsp;//data&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[6] = 0xED;&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[5] = 0xFA;&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[4] = 0xCE;&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[11] = 0xCA;&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[10] = 0xFE;&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[9] = 0xBE;&lt;BR /&gt;&amp;nbsp;FTFC-&amp;gt;FCCOB[8] = 0xEF;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;FTFC-&amp;gt;FSTAT = FTFC_FSTAT_CCIF_MASK;&amp;nbsp;//launch command&lt;BR /&gt;&amp;nbsp;while((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0);&amp;nbsp;//wait for done&lt;BR /&gt;}&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 16:18:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-store-to-DFlash-EFlash-memory/m-p/866431#M3806</guid>
      <dc:creator>jay_montague</dc:creator>
      <dc:date>2019-03-18T16:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to store to DFlash/EFlash memory</title>
      <link>https://community.nxp.com/t5/S32K/How-to-store-to-DFlash-EFlash-memory/m-p/866432#M3807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good question. There's a note in the RM which can be easily overlooked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61917i6DF9433708224053/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;So, if you are going to program address 0x1000_0000 then write these values to FCCOB registers:&lt;/P&gt;&lt;P&gt;FCCOB[1] = 0x80&lt;/P&gt;&lt;P&gt;FCCOB[2] = 0x00&lt;/P&gt;&lt;P&gt;FCCOB[3] = 0x00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 13:29:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-store-to-DFlash-EFlash-memory/m-p/866432#M3807</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2019-03-19T13:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to store to DFlash/EFlash memory</title>
      <link>https://community.nxp.com/t5/S32K/How-to-store-to-DFlash-EFlash-memory/m-p/866433#M3808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lukas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your reply! I'm now able to successfully write to the D-Flash memory. I must of missed that paragraph when reading through the manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:13:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-store-to-DFlash-EFlash-memory/m-p/866433#M3808</guid>
      <dc:creator>jay_montague</dc:creator>
      <dc:date>2019-03-22T17:13:26Z</dc:date>
    </item>
  </channel>
</rss>

