<?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>S32 SDK中的主题 Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
    <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786816#M485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" style="color: #777777; background-color: #ffffff; font-size: 13px;"&gt;&lt;DIV style="margin-right: 4px;"&gt;&lt;DIV class="" style="border-width: 1px; border-style: solid; border-color: #c0c0c0 #d9d9d9 #d9d9d9; margin-bottom: 8px;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #777777; background-color: #ffffff; font-size: 13px;"&gt;&lt;DIV style="margin-left: 4px; padding-bottom: 20px;"&gt;&lt;DIV&gt;&lt;DIV style="background: whitesmoke; border: 1px solid whitesmoke; margin: 0px 0px 8px;"&gt;&lt;DIV&gt;&lt;DIV dir="ltr" style="padding: 8px;"&gt;&lt;SPAN class="" lang="en" style="color: #222222; font-size: 24px;"&gt;&lt;SPAN class=""&gt;thank you for your reply:smileylaugh:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2018 06:41:17 GMT</pubDate>
    <dc:creator>建宽高</dc:creator>
    <dc:date>2018-07-12T06:41:17Z</dc:date>
    <item>
      <title>how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786804#M473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&amp;nbsp;how to read &amp;nbsp;FlexMemory as EEPROM on s32k144 ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/application-note/AN11983.pdf" rel="noreferrer nofollow" style="color: #444444; background-color: #edeff0;" target="_blank"&gt;AN11983&lt;/A&gt;&amp;nbsp;, on page &amp;nbsp;15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3.5.2 EEE reads When the EEE is read, the data is supplied by the FlexRAM, so no flash operations are triggered. However, EEE reads are not allowed while a EEE write is in progress. Software must wait for CCIF after a write access before allowing software to continue. This way a special function is needed for EEE writes, but a EEE read does not require any special software. Another advantage to this approach is that no additional delay or flag checking is required if you have multiple EEE read accesses with no EEE write cycles in between. A special case for a EEE read that must be considered is the first access to the EEE after a reset. For the first read of the EEE after reset, the EEERDY bit may need to be tested to make sure that the state machine has completed the initial load of data from the E-flash to the FlexRAM. If the system start-up time is long, this guarantees that the initial data load has time to complete before the first EEE read, then a test of the EEERDY flag before the first read may not be required. However, it is safer to explicitly test the EEERDY bit before the first read access to the EEE. Certain CSEc boot options (for example, MAC boot options) might prevent FCNFG[EEERDY] flag to be set until boot process is finished correctly&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;```&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 14px;"&gt;I know I have to wait for EERDY to read the eeprom,&amp;nbsp; &amp;nbsp;1 have create &amp;nbsp; flash_partitioning_s32k144 example on &amp;nbsp;S32K144 IDE (SDK 0.8.6) ,but not support &amp;nbsp;such as&amp;nbsp;&lt;STRONG&gt;FLASH_DRV_EEE_READ &amp;nbsp; &lt;/STRONG&gt;API , only support &amp;nbsp;&lt;STRONG&gt;FLASH_DRV_EEEWrite&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how to read data from eeprom. can you&amp;nbsp;provide a reading api such as&amp;nbsp;&lt;STRONG style="color: #333333;"&gt;FLASH_DRV_EEE_READ &amp;nbsp;?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333;"&gt;thank you&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2018 03:31:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786804#M473</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-07-06T03:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786805#M474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can look at this example -&amp;nbsp;&lt;A href="https://community.nxp.com/docs/DOC-340114"&gt;https://community.nxp.com/docs/DOC-340114&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically - the current values are loaded after reset - and there is always last value present in your variable mapped into EEERAM space.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2018 11:29:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786805#M474</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-07-06T11:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786806#M475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="color: #999999; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN class=""&gt;&lt;A data-keyword="thanks" style="color: #2b77c5; font-weight: bold;"&gt;thanks&lt;/A&gt; &lt;A data-keyword="for" style="color: #2b77c5; font-weight: bold;"&gt;for&lt;/A&gt; &lt;A data-keyword="your" style="color: #2b77c5; font-weight: bold;"&gt;your&lt;/A&gt; &lt;A data-keyword="reply" style="color: #2b77c5; font-weight: bold;"&gt;reply&lt;/A&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;UL data-v-818c6560="" style="color: #2e3033; background-color: #ffffff; font-size: 14px;"&gt;&lt;LI data-v-818c6560="" style="margin: 0px 0px 10px;"&gt;&lt;P class="" data-group="1-1" data-v-818c6560="" style="color: #666666; font-size: 14px;"&gt;I want to know if there is &lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;&lt;STRONG&gt; EERDY to read the eeprom&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; API，but the example give write api。&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2018 10:14:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786806#M475</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-07-07T10:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786807#M476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is no such feature - and technically there is no reason for that flag.&amp;nbsp; Only what you need to do is check readiness for next flash write for example by&amp;nbsp;&lt;/P&gt;&lt;P&gt;while ((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0){}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For what purpose you need something like "Ready for read" flag?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally you have variable like in the mentioned example the struct mapped to flexRAM memory space (0x14000000):&lt;/P&gt;&lt;P&gt;typedef struct&lt;BR /&gt;{&lt;BR /&gt; float p1;&lt;BR /&gt; float p2;&lt;BR /&gt; float p3;&lt;BR /&gt; float p4;&lt;BR /&gt; char ch;&lt;BR /&gt; double d1;&lt;BR /&gt; double d2;&lt;BR /&gt; unsigned long runtime_sec;&lt;BR /&gt; int i1;&lt;BR /&gt; char user_data[USER_DATA_SIZE];&lt;BR /&gt;} eeerom_data_t;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__ ((section(".eeeprom"))) eeerom_data_t eeerom_data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reset - the values&amp;nbsp; are read from Flash to your struct in FlexRAM . When you change for example&amp;nbsp;&lt;/P&gt;&lt;P&gt;eeerom_data.i1 to different value - the RAM part is changed instantly and is instantly ready for read. The Backup FLASH part is stored (and ready for another write) when the FTFC_FSTAT_CCIF is set to 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2018 06:45:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786807#M476</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-07-09T06:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786808#M477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I read the eeprom data of the flexram simulation, I wait for the EERDY bit every time. If the pointer points to this area, the data read may be wrong, because there is no EERDY judgment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If EERDY may not be ready during the eeprom write process of flexram simulation, will there be a problem in reading data in this process, just reading the old data, not reading the newly written data, reading in the process Does it affect the entire system, or is it just that the data is read incorrectly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 06:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786808#M477</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-07-11T06:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786809#M478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;你好，你是中国人吗，能否给我一下你的qq,我有一些问题想请教。&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use English - we are worldwide community. Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello, are you Chinese? Can you give me your qq? I have some questions I would like to ask.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 08:55:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786809#M478</guid>
      <dc:creator>1642280511</dc:creator>
      <dc:date>2018-07-11T08:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786810#M479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the way how the emulated eeprom works on S32K144 is that you have FlexRAM mirrored to DFLASH. That means for reading there is no way how to get "old" data. In the FlexRAM you always have the last value written there. Interface for you is only the RAM part, the flash backup is done on background. And the only parameter what you need to check is readiness for next write (assign new value to variable in your FlexRAM used as emulated EEPROM).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is the same as for normal variable in the RAM - there is no reason check if the variable is updated - it always is.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or may be I don't understand what you are trying to do. Please try the example mentioned above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another idea - by EERDY you mean the FTFC-&amp;gt;FCNFG register and bit 0 (EEERDY)? This bit is set to 1 when the DFLASH is partitioned as backup for Emulated EEPROM. When device is not partitioned properly - the FlexRAM is used as regular RAM. In this case variables may be uninitialized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 09:25:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786810#M479</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-07-11T09:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786811#M480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, are you Chinese? Can you give me your qq? I have some questions I would like to ask.thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 09:29:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786811#M480</guid>
      <dc:creator>1642280511</dc:creator>
      <dc:date>2018-07-11T09:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786812#M481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;Maybe there's something wrong with my description&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;STRONG&gt;flash_drive.c&lt;/STRONG&gt; &amp;nbsp;has already exist &amp;nbsp;&lt;STRONG&gt;FLASH_DRV_EEEWrite &lt;/STRONG&gt;api. I can use this api to write eeprom, but &amp;nbsp;flash_drive.c &amp;nbsp;not provide a read api, like&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;FLASH_DRV_EEERead&lt;/STRONG&gt; api.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="color: #51626f;"&gt;I have read&amp;nbsp;&lt;/SPAN&gt;&lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN11983.pdf" rel="nofollow" style="color: #444444; background-color: #edeff0; border: 0px; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;AN11983&lt;/A&gt;&lt;SPAN style="color: #51626f;"&gt;&amp;nbsp;, on page &amp;nbsp;15&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; color: #51626f;"&gt;&lt;EM&gt;3.5.2 EEE reads When the EEE is read, the data is supplied by the FlexRAM, so no flash operations are triggered.&lt;STRONG&gt; However, EEE reads are not allowed while a EEE write is in progress.&lt;/STRONG&gt; Software must wait for CCIF after a write access before allowing software to continue. This way a special function is needed for EEE writes, but a EEE read does not require any special software. Another advantage to this approach is that no additional delay or flag checking is required if you have multiple EEE read accesses with no EEE write cycles in between. A special case for a EEE read that must be considered is the first access to the EEE after a reset. &lt;STRONG&gt;For the first read of the EEE after reset, the EEERDY bit may need to be tested to make sure that the state machine has completed the initial load of data from the E-flash to the FlexRAM.&lt;/STRONG&gt; If the system start-up time is long, this guarantees that the initial data load has time to complete before the first EEE read, then a test of the EEERDY flag before the first read may not be required. However, it is safer to explicitly test the EEERDY bit before the first read access to the EEE. Certain CSEc boot options (for example, MAC boot options) might prevent FCNFG[EEERDY] flag to be set until boot process is finished correctly&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I bolded two key considerations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: upper-roman;"&gt;&lt;LI&gt;&lt;SPAN style="color: #51626f;"&gt;&lt;EM&gt;&lt;STRONG&gt; However, EEE reads are not allowed while a EEE write is in progress&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;For the first read of the EEE after reset, the EEERDY bit may need to be tested to make sure that the state machine has completed the initial load of data from the E-flash to the FlexRAM&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;So I wrote the read function based on these two principles in pseudo code&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;```c&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;status_t FLASH_DRV_EEERead(const flash_ssd_config_t * pSSDConfig,&lt;BR /&gt; uint32_t dest,&lt;BR /&gt; uint32_t size,&lt;BR /&gt; const uint8_t * pData)&lt;BR /&gt;{&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* Check if EEE is enabled */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if ((FTFx_FCNFG &amp;amp; FTFx_FCNFG_EEERDY_MASK) == FTFx_FCNFG_EEERDY_MASK)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*** Determine if it is writing, if it is writing eeprom, wait for completion*/&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while( writing_flag == 1);&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;/** read &amp;nbsp;operation */&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp; else&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp; {&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ret = STATUS_UNSUPPORTED;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;&amp;nbsp; }&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;return ret&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;```&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f;"&gt;&lt;EM style="font-weight: normal;"&gt;&lt;EM&gt;Is this correct?&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 10:41:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786812#M481</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-07-11T10:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786813#M482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally - I get it. So - the EEERDY flag is set to 1 in meaning that EEEPROM functionality is enabled (Dflash is partitioned for EEEPROM feature). This flag is not cleared when background flash write is performed. If you like to check if the write is done - you can use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;When the CCIF bit is cleared- flash operation is performed, when it is set - you can perform another write and you are sure that FlexRAM data are okay and accessible. So - as mentioned in the AN - before first FlexRAM read/write - is good idea check if the Dflash is used for EEEPROM by checking &lt;SPAN&gt;FTFC-&amp;gt;FCNFG-&amp;gt;&lt;/SPAN&gt;EEERDY bit. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;It depends on your program architecture - but normally is read more common than write. Good idea is waiting for the CCIF bit in write cycle and perform read without checking this bit (to save CPU time).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hope ti helps.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Jiri&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 11:27:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786813#M482</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-07-11T11:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786814#M483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That means I can read the value of the eeprom address directly, without judging any flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g &amp;nbsp; &amp;nbsp; I want to read the value of the address 0x14000000 to do this?&lt;/P&gt;&lt;P&gt;```c&lt;/P&gt;&lt;P&gt;char read_val=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read_val = *((unsigned char *)&lt;SPAN&gt;0x14000000&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2018 02:19:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786814#M483</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-07-12T02:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786815#M484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;yes - in case that you will wait for the flag in your write function. Also better idea is map your variables to FlexRAM area by linker file (like in the example above). In this case you can operate with variable name directly -your_flexram_var is located on 0x14000000 address by linker script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;your_flexram_var=100;&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp;- performs backgroud flash write.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;STRONG&gt;while ((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0){}&lt;/STRONG&gt;&amp;nbsp; // don't forget wait for flash write op done;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;your_local_var = your_flexram_var;&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp; - copy value from flexram to your local one - or you can use your_flexram_var as regular variable.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2018 05:51:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786815#M484</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-07-12T05:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to read  FlexMemory as EEPROM on s32k144 ?</title>
      <link>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786816#M485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" style="color: #777777; background-color: #ffffff; font-size: 13px;"&gt;&lt;DIV style="margin-right: 4px;"&gt;&lt;DIV class="" style="border-width: 1px; border-style: solid; border-color: #c0c0c0 #d9d9d9 #d9d9d9; margin-bottom: 8px;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #777777; background-color: #ffffff; font-size: 13px;"&gt;&lt;DIV style="margin-left: 4px; padding-bottom: 20px;"&gt;&lt;DIV&gt;&lt;DIV style="background: whitesmoke; border: 1px solid whitesmoke; margin: 0px 0px 8px;"&gt;&lt;DIV&gt;&lt;DIV dir="ltr" style="padding: 8px;"&gt;&lt;SPAN class="" lang="en" style="color: #222222; font-size: 24px;"&gt;&lt;SPAN class=""&gt;thank you for your reply:smileylaugh:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2018 06:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/how-to-read-FlexMemory-as-EEPROM-on-s32k144/m-p/786816#M485</guid>
      <dc:creator>建宽高</dc:creator>
      <dc:date>2018-07-12T06:41:17Z</dc:date>
    </item>
  </channel>
</rss>

