<?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 MC9S08SH8 - How to save data in Flash Memory in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH8-How-to-save-data-in-Flash-Memory/m-p/203132#M16777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to save some data of my application in the flash memory of MC9S08SH8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user of application should be able to choose a new value while the application is running&amp;nbsp;and&amp;nbsp;the application should be able to keep this data in the non-volatile memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any example of how to save data in the flash memory (as an EEPROM)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 May 2010 21:04:05 GMT</pubDate>
    <dc:creator>cremonezi</dc:creator>
    <dc:date>2010-05-25T21:04:05Z</dc:date>
    <item>
      <title>MC9S08SH8 - How to save data in Flash Memory</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH8-How-to-save-data-in-Flash-Memory/m-p/203132#M16777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to save some data of my application in the flash memory of MC9S08SH8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user of application should be able to choose a new value while the application is running&amp;nbsp;and&amp;nbsp;the application should be able to keep this data in the non-volatile memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any example of how to save data in the flash memory (as an EEPROM)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 May 2010 21:04:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH8-How-to-save-data-in-Flash-Memory/m-p/203132#M16777</guid>
      <dc:creator>cremonezi</dc:creator>
      <dc:date>2010-05-25T21:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08SH8 - How to save data in Flash Memory</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH8-How-to-save-data-in-Flash-Memory/m-p/203133#M16778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you search this forum, you should find numerous examples of programming non-volatile data to a flash block, from within an application.&amp;nbsp; This is a very frequent request.&amp;nbsp; The datasheet for the device details the erase amd programming algorithms used, and provides flow diagrams.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some basics to&amp;nbsp;keep in mind&amp;nbsp;-&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The minimum block size for erasure is 512 bytes.&lt;/LI&gt;&lt;LI&gt;Flash memory within the same flash array is inaccessible during the erasure or byte programming process, so the code for these operations must be&amp;nbsp;transferred to RAM, and run from there.&amp;nbsp; The device you are using, along with most other HCS08 devices, has only a single flash array.&lt;/LI&gt;&lt;LI&gt;The RAM based code may be either pushed onto the stack, or alternatively occupy a fixed block of RAM.&amp;nbsp; The size of the&amp;nbsp;block&amp;nbsp;is quite variable, depending on the specific implemtation.&amp;nbsp; For the 'SH8 device, the minimum is about 20 bytes of code.&lt;/LI&gt;&lt;LI&gt;Interrupts need to be globally disabled during the erasure or byte programming process.&lt;/LI&gt;&lt;/OL&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>Tue, 25 May 2010 22:19:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH8-How-to-save-data-in-Flash-Memory/m-p/203133#M16778</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-05-25T22:19:01Z</dc:date>
    </item>
  </channel>
</rss>

