<?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: MC9S12XEP100 Emulate EEPROM in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411039#M11125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr Radeks,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Thank you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;very much for your&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;analysis&lt;/SPAN&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;When I read in memory 0x10700'G (or with pointer (*(unsigned int *far)0x107F00) , I read 0xFACF. &lt;SPAN class="hps"&gt;This value&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is close to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;0xFFFF&lt;/SPAN&gt;. &lt;SPAN class="hps"&gt;Do you think the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;problem&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;comes from there?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Is there&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a way to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;unlock&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;DFLASH&lt;/SPAN&gt;. &lt;SPAN class="hps"&gt;Either&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;DFLASH&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;blocked&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;permanently&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;my application&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;should hide&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;interruptions&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;before starting the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;sauv_config&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;() procedure&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Thank you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;sincerely&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for your help&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2015 07:49:01 GMT</pubDate>
    <dc:creator>eric92</dc:creator>
    <dc:date>2015-08-06T07:49:01Z</dc:date>
    <item>
      <title>MC9S12XEP100 Emulate EEPROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411037#M11123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I use the Library IEE1.C generate by PE to write and read in the Emulate EEPROM.&lt;/P&gt;&lt;P&gt;At the beginning there is no problem.&lt;/P&gt;&lt;P&gt;But &lt;SPAN class="hps"&gt;after several&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;months&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;writing&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;becomes impossible&lt;/SPAN&gt;.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;I send you the file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;The date to store are in the SAUV_RAM segment in RamEEProm.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;The procedure char sauv_config()&amp;nbsp; in Eepromx.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;The procedure&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;retrieving data&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is&lt;/SPAN&gt; bool rappel_config() in Eepromx.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;I use the version 5.9.0 of Code Warrior&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Mask 5M48H&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Have&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;you an idea about&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the problem ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Best regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339065"&gt;0330&amp;amp;Boot_V1.prm.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339065"&gt;IEE1.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339065"&gt;IEE1.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339065"&gt;RamEEprom.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339065"&gt;Eepromx.c.zip&amp;nbsp;&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 13:41:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411037#M11123</guid>
      <dc:creator>eric92</dc:creator>
      <dc:date>2015-08-04T13:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12XEP100 Emulate EEPROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411038#M11124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;I guess that problem could be in partially partitioned D-Flash (Partition command was interrupted).&lt;/P&gt;&lt;P&gt;Could you please try read word at global address 0x107F00?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At address 0x107F00 starts the last D-Flash sector.&lt;/P&gt;&lt;P&gt;Each sector starts with a header field containing two words that define its status and erase count. The sector header format is designed to allow:&lt;/P&gt;&lt;P&gt;• All state transitions to be achieved using single programming operations&lt;/P&gt;&lt;P&gt;• Effective use of the D-flash ECC&lt;/P&gt;&lt;P&gt;• Detection of EEE reset condition&lt;/P&gt;&lt;P&gt;• Basic tracking of the sector erase count (up to 65534)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we start with partitioning, DFPART and ERPART are written as first. After that MCU continue in formatting part of D-Flash which are reserved for EEE (depends on DFPART and ERPART values).&lt;/P&gt;&lt;P&gt;If there is any unexpected interrupt during this time (e.g. power down), D-Flash will stay formatted only partially.&lt;/P&gt;&lt;P&gt;From this point of view, reading DFPART and ERPART cannot sign whether D-Flash was partitioned successfully or not.&lt;/P&gt;&lt;P&gt;From beginning everything works correctly, but after some time, formatted D-Flash is consumed for EEE data updates and the next D-Flash sector is not correctly formatted. In this point EEE stops storing new values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to recommend test last header field at address 0x107F00 for information whether partitioning was successful.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(*(unsigned int *far)0x107F00 == 0xFFFF) err = FORMAT_ERROR; //Was D-Flash correctly formmated?&lt;/P&gt;&lt;P&gt;//err signalize format error&lt;/P&gt;&lt;P&gt;//partitioning was interrupted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 13:55:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411038#M11124</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-08-05T13:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12XEP100 Emulate EEPROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411039#M11125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr Radeks,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Thank you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;very much for your&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;analysis&lt;/SPAN&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;When I read in memory 0x10700'G (or with pointer (*(unsigned int *far)0x107F00) , I read 0xFACF. &lt;SPAN class="hps"&gt;This value&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is close to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;0xFFFF&lt;/SPAN&gt;. &lt;SPAN class="hps"&gt;Do you think the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;problem&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;comes from there?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Is there&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a way to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;unlock&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;DFLASH&lt;/SPAN&gt;. &lt;SPAN class="hps"&gt;Either&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;DFLASH&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;blocked&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;permanently&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;my application&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;should hide&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;interruptions&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;before starting the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;sauv_config&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;() procedure&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Thank you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;sincerely&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for your help&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 07:49:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411039#M11125</guid>
      <dc:creator>eric92</dc:creator>
      <dc:date>2015-08-06T07:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12XEP100 Emulate EEPROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411040#M11126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to apologize, but I didn’t read your code carefully.&lt;/P&gt;&lt;P&gt;Possible issue in my previous reply doesn’t have any direct connection with your code. Please ignore it.&lt;/P&gt;&lt;P&gt;According your reading address 0x107F00, D-Flash part for EEEPROM is correctly formatted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked again on you code and I discover that you used driver which emulated EEPROM by software.&lt;/P&gt;&lt;P&gt;This is quite strange solution due to fact, that S12XE family already has emulated EEPROM solved on hardware side. So, finally you have two independent emulated EEPROMs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, your code divided 32kB of D-Flash into two parts (DFPART=0x40, ERPART=0x08). So, upper 16kB of D-Flash is used for hardware EEEPROM and lower 16kB you used for software EEEPROM.&lt;/P&gt;&lt;P&gt;Function IEE1_Partition() partitioned D-Flash into two part during first run and it also enable hardware EEEPROM after every reset (when we call IEE1_Init).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue1: Function IEE1_Partition() use Full Partition D-Flash command (0x0F). This function erases whole D-flash and partition that. Unfortunately this command cannot be used in normal mode (it works only in special mode). So, correctly you should during first run erase D-Flash by command loop with Erase D-Flash Sector command (0x12) and call Partition D-Flash command (0x20).&lt;/P&gt;&lt;P&gt;Note: I would like to recommend also add testing address 0x107F00 for check whether D-flash part dedicated for hardware EEEPROM was formatted correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I am not sure what could be reason for software EEEPROM failure on your side. It may be some software issue or you simply reach maximum number of write cycles into D-flash. Could you please estimate how many times you called sauv_config() function until first issue? Also information about amount of stored bytes could help to estimate whether reach maximum number of write cycles into D-flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I would like to recommend use built-in hardware emulation of EEPROM. You can simply write and modify your data into Buffer RAM (0x13F800- 0x13FFFF in your case) and all these changes will be applied to nonvolatile memory on background without any CPU or XGATE intervention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In attachment you can find short description of hardware emulated EEPROM at S12XE, and example codes.&lt;/P&gt;&lt;P&gt;Note: If we want wait until data are stored into D-Flash (for example prior reset), we could use command like: while((ETAG &amp;gt; 0) || (FSTAT_MGBUSY == 1)); //we can wait till data are stored to D-Flash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 12:09:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411040#M11126</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-08-06T12:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12XEP100 Emulate EEPROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411041#M11127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr Radeks,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for these precious information&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;The&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;bytes number &lt;/SPAN&gt;&lt;SPAN class="hps"&gt;written&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to each call &lt;/SPAN&gt;&lt;SPAN class="hps"&gt;of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;sauv_config&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;call&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;(&lt;/SPAN&gt;) function &lt;SPAN class="hps"&gt;is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;210 (decimal)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;The number of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;function call&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;before problems&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;occur&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;can be&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;estimated at&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;55 000 (decimal) or more&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Thank you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;code examples&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;The&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;IEE1.c&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;module&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;was generated by&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Processor&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Expert&lt;/SPAN&gt;. &lt;SPAN class="hps"&gt;I do&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;not know why he&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;did not use the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;hardware&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;emulation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I had already seen the AN3743 application note&lt;SPAN class="hps"&gt;.&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I was&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;completely&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;lost because&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I did not understand&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the link with the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;IIE1.c.&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Module.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;I realize I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;should not have&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;used&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;PE&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;function&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Have a good day&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 09:41:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411041#M11127</guid>
      <dc:creator>eric92</dc:creator>
      <dc:date>2015-08-07T09:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12XEP100 Emulate EEPROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411042#M11128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for these details.&lt;/P&gt;&lt;P&gt;16kB D-Flash has 64 sectors. In you code it also presents 64 virtual pages. I didn’t analyze sauv_config() deeply, but I see that this function contains write function on more than one place. I will now calculate with 3 writes per sauv_config() function execution as worst case.&lt;/P&gt;&lt;P&gt;So, if all data was written subsequently it presents approximately 55000*3/64 cycles = 2578 write cycles on page. From this point of view, it is possible that D-Flash is not damaged yet.&lt;/P&gt;&lt;P&gt;Anyway, if you want fix code and use this MCU again, I would like to recommend mass-erase of MCU (it erases also partition configuration, you could use unsecure procedure for that) and test whole D-Flash prior using it (write zeros and ones and read whether all bits are OK, of course we should check also ECC flags during/after reading).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thing, that EEEProm driver in PE isn’t so bad, but rather "too universal" (we are still not sure if this stop works due to error in driver or due to hardware limitation in number of write cycles). Driver was written for work both ways (hardware and software) and it probably just depends on some configuration which approach will be used. Anyway, for using it at hardware emulated EEPTOM, it is unnecessary complicated tool.&lt;/P&gt;&lt;P&gt;Code related to hardware emulated EEPROM could be detect by testing memory range IEE1_EEE_START…IEE1_EEE_END and it presents approximately 5% of IEE driver only…. Therefore it could be simply overlook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 13:25:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12XEP100-Emulate-EEPROM/m-p/411042#M11128</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-08-07T13:25:42Z</dc:date>
    </item>
  </channel>
</rss>

