<?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: Using flash to store log information in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219146#M19094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're looking for "EEPROM Emulation"&amp;nbsp; Do a quick search and see if that can answer some of your questions.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="http://forums.freescale.com/t5/forums/searchpage/tab/message?location=Board%3A8BITCOMM&amp;amp;q=eeprom+emulation#message-list" target="_blank"&gt;http://forums.freescale.com/t5/forums/searchpage/tab/message?location=Board%3A8BITCOMM&amp;amp;q=eeprom+emulation#message-list&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://www.google.com/search?hl=en&amp;amp;q=site:freescale.com+eeprom+emulation" rel="nofollow" target="_blank"&gt;http://www.google.com/search?hl=en&amp;amp;q=site:freescale.com+eeprom+emulation&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;AN3824 might help as well (emulation on an HCS08 MCU) &lt;A href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3824.pdf?fsrch=1&amp;amp;sr=3" rel="nofollow" target="_blank"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3824.pdf?fsrch=1&amp;amp;sr=3&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Aug 2010 04:36:58 GMT</pubDate>
    <dc:creator>NickT</dc:creator>
    <dc:date>2010-08-20T04:36:58Z</dc:date>
    <item>
      <title>Using flash to store log information</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219145#M19093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody&lt;/P&gt;&lt;P&gt;I have a question related to how to manage a task that I think is quite easy for expert in MCU's programming but about which I have some doubts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm programming a device HCS08 and I have to store a big amount of data (mainly log related) in non volatile memory (about 350 byte).&lt;/P&gt;&lt;P&gt;Part of this data should be updated each time I restart my board, but retained when the board is shutted down.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to avoid using RAM as a temporary storage for data I was thinking about using two page of Flash and using them as a ping pong buffer.&lt;/P&gt;&lt;P&gt;However I don't know if this is the better way or if I missing a better approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide a a feedback about my idea? Is there some example about this topic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is a stupid question, please be patient, I'm a newbie!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 03:51:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219145#M19093</guid>
      <dc:creator>Giox79</dc:creator>
      <dc:date>2010-08-20T03:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using flash to store log information</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219146#M19094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're looking for "EEPROM Emulation"&amp;nbsp; Do a quick search and see if that can answer some of your questions.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="http://forums.freescale.com/t5/forums/searchpage/tab/message?location=Board%3A8BITCOMM&amp;amp;q=eeprom+emulation#message-list" target="_blank"&gt;http://forums.freescale.com/t5/forums/searchpage/tab/message?location=Board%3A8BITCOMM&amp;amp;q=eeprom+emulation#message-list&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://www.google.com/search?hl=en&amp;amp;q=site:freescale.com+eeprom+emulation" rel="nofollow" target="_blank"&gt;http://www.google.com/search?hl=en&amp;amp;q=site:freescale.com+eeprom+emulation&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;AN3824 might help as well (emulation on an HCS08 MCU) &lt;A href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3824.pdf?fsrch=1&amp;amp;sr=3" rel="nofollow" target="_blank"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3824.pdf?fsrch=1&amp;amp;sr=3&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 04:36:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219146#M19094</guid>
      <dc:creator>NickT</dc:creator>
      <dc:date>2010-08-20T04:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using flash to store log information</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219147#M19095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Many thanks for your useful help. It seems that I ignored the right word :-D I will read the documents. I already integrated the doonstack.asm , .h and .inc files in my project. I hope it will works. Thanks again for your hint. Giovanni&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Aug 2010 03:53:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219147#M19095</guid>
      <dc:creator>Giox79</dc:creator>
      <dc:date>2010-08-21T03:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using flash to store log information</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219148#M19096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do not mention which 9S08 device you are contemplating to use.&amp;nbsp; Most devices have 512 byte flash sectors within a single array.&amp;nbsp; This requires that some of the erase and programming code be run from RAM because flash memory is not accessible when the programming voltage is internally applied to the array.&amp;nbsp; The doonstack code uses the stack for this purpose.&amp;nbsp; It is also possible to use a fixed location in RAM, which requires somewhat simpler code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, you might also wish to consider the 9S08DNxx device, which contains EEPROM flash within a separate array from the program flash.&amp;nbsp; The EEPROM has a sector size of eight bytes, which may be erased and programmed directly from code residing in program flash, rather than RAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Providing primary and secondary copies of the NV data would be essential with a total data size of 350 bytes,&amp;nbsp;if using large sector flash.&amp;nbsp; This would insure against data corruption due to&amp;nbsp;loss of power part-way through the erase and programming process.&amp;nbsp; You will need to attach a CRC value to each copy so that NV data validity of both copies can be checked on each power up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the device with EEPROM, a similar approach remains desirable, even though the sector size is smaller.&amp;nbsp; Keep in mind that the sector erase period wll be in the vicinity of 20ms irrespective of the sector size.&amp;nbsp; Since the programming time for each byte is much shorter, the sector erase period will predominate the total erase and programming time.&amp;nbsp; If the updated portions of the NV data should occupy many&amp;nbsp;EEPROM sectors, the use of EEPROM may actually be slower than using program flash, because of the multiple sector erases required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the two copy approach, the need for additional data storage in RAM will depend on whether byte-by-byte programming, or burst programming is used.&amp;nbsp; In the latter case, a further RAM buffer would be required&amp;nbsp;of flash row size.&amp;nbsp; The use of burst programming would save about 25 microseconds per byte.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Aug 2010 02:14:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219148#M19096</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-08-22T02:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using flash to store log information</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219149#M19097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, thanks for your reply, I'm currently involved in a project with a MC9S08QE8CTG device. So I'm using the RAM as a buffer. Using the byte by byte write method the system seems work , now I will try using the FlashProgBurst approach. Thanks again for your useful help.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Aug 2010 02:38:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-flash-to-store-log-information/m-p/219149#M19097</guid>
      <dc:creator>Giox79</dc:creator>
      <dc:date>2010-08-22T02:38:06Z</dc:date>
    </item>
  </channel>
</rss>

