<?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: AN2295 - Setting up a section as NVRAM in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/AN2295-Setting-up-a-section-as-NVRAM/m-p/201727#M16563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;it seems to me that this erasure is not related directly to the bootloader but rather to the "organizational" structure of the Flash itself.&lt;BR /&gt;&lt;BR /&gt;If your data are at 0x1A00 address, the 512B erase page boundary starts at 0x1A00, ends at 0x1BFF. As you mention, no S19 (hex) data should appear in your code.&lt;BR /&gt;&lt;BR /&gt;If there's no data in that page, master side of the bootloader does NOT issue a Erase command to that page. You can verify this by using Debug version of hc08sprg.exe (find attached). It displays all commands and communication issued during the bootloading. Please, check this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;On the other hand, you can even use the bootloader to store just the MAC address, if you have "MAC address only" S19 file like this:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;S1071A00313730311C
S9030000FC&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;issuing the bootloader for the second time after your code is loaded.&lt;BR /&gt;&lt;BR /&gt;Pavel (an2295 bootloader developer)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://www.freescale.com/files/community_files/8BITCOMM/hc08sprg_v9_0_45_0_debug.zip" rel="nofollow noopener noreferrer" target="_self"&gt;hc08sprg.exe.ver 9.0.45.0.debug.exe.zip&lt;/A&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-09-03&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;05:14 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2009 17:01:08 GMT</pubDate>
    <dc:creator>ok2ucx</dc:creator>
    <dc:date>2009-01-06T17:01:08Z</dc:date>
    <item>
      <title>AN2295 - Setting up a section as NVRAM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/AN2295-Setting-up-a-section-as-NVRAM/m-p/201726#M16562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a GT60 part with the bootloader from AN2295.&amp;nbsp; I am trying to protect a section from erasure (1A00-19FF) so i can store MAC address, power levels, contrast and various one time settings.&amp;nbsp; New code updates through the bootloader can't touch this area.&amp;nbsp; I have been working on this for a while.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are clips on how i setup the bootloader ID_STRING section.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FLS_BEG&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $1080&amp;nbsp;&amp;nbsp; ; FLASH #0 block start&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FLS_END&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $1800&amp;nbsp;&amp;nbsp; ; FLASH #0 block end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FLS_BEG1&amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $182C&amp;nbsp;&amp;nbsp; ; FLASH #1 block start&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FLS_END1&amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $19FF&amp;nbsp;&amp;nbsp; ; FLASH #1 block end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FLS_BEG2&amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $2000&amp;nbsp;&amp;nbsp; ; FLASH #2 block start&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FLS_END2&amp;nbsp;&amp;nbsp;&amp;nbsp; EQU&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $FDC0&amp;nbsp;&amp;nbsp; ; FLASH #2 block end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DC.B&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&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; ; number of Flash blocks&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC.W&amp;nbsp;&amp;nbsp;&amp;nbsp; FLS_BEG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; START ADDRESS OF FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC.W&amp;nbsp; FLS_END&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ; END ADDRESS OF FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC.W&amp;nbsp;&amp;nbsp;&amp;nbsp; FLS_BEG1&amp;nbsp;&amp;nbsp;&amp;nbsp; ; START ADDRESS OF FLASH #2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC.W&amp;nbsp;&amp;nbsp;&amp;nbsp; FLS_END1&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ; END ADDRESS OF FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;#2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC.W&amp;nbsp;&amp;nbsp;&amp;nbsp; FLS_BEG2&amp;nbsp;&amp;nbsp;&amp;nbsp; ; START ADDRESS OF FLASH #3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DC.W&amp;nbsp;&amp;nbsp;&amp;nbsp; FLS_END2&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ; END ADDRESS OF FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;#3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a BDM to load the bootloader then manually putting values into 1A00 (31 37 30 31)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I then reset the bdm and re-read 1a00 to verify it exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When using the bootloader and the PC serial program I put my application in.&amp;nbsp; (No references are made&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the hex file to locations 1a00-1fff).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I connect it back to the bdm, reset the chip, and read the memory of the device&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1a00 is now FF&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would appreciate any input on how i can create a section of memory that the bootloader can't erase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 01:54:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/AN2295-Setting-up-a-section-as-NVRAM/m-p/201726#M16562</guid>
      <dc:creator>phedlund</dc:creator>
      <dc:date>2008-11-13T01:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: AN2295 - Setting up a section as NVRAM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/AN2295-Setting-up-a-section-as-NVRAM/m-p/201727#M16563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;it seems to me that this erasure is not related directly to the bootloader but rather to the "organizational" structure of the Flash itself.&lt;BR /&gt;&lt;BR /&gt;If your data are at 0x1A00 address, the 512B erase page boundary starts at 0x1A00, ends at 0x1BFF. As you mention, no S19 (hex) data should appear in your code.&lt;BR /&gt;&lt;BR /&gt;If there's no data in that page, master side of the bootloader does NOT issue a Erase command to that page. You can verify this by using Debug version of hc08sprg.exe (find attached). It displays all commands and communication issued during the bootloading. Please, check this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;On the other hand, you can even use the bootloader to store just the MAC address, if you have "MAC address only" S19 file like this:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;S1071A00313730311C
S9030000FC&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;issuing the bootloader for the second time after your code is loaded.&lt;BR /&gt;&lt;BR /&gt;Pavel (an2295 bootloader developer)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://www.freescale.com/files/community_files/8BITCOMM/hc08sprg_v9_0_45_0_debug.zip" rel="nofollow noopener noreferrer" target="_self"&gt;hc08sprg.exe.ver 9.0.45.0.debug.exe.zip&lt;/A&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-09-03&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;05:14 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 17:01:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/AN2295-Setting-up-a-section-as-NVRAM/m-p/201727#M16563</guid>
      <dc:creator>ok2ucx</dc:creator>
      <dc:date>2009-01-06T17:01:08Z</dc:date>
    </item>
  </channel>
</rss>

