<?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 problem with memory mapping!  thanks all! in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/problem-with-memory-mapping-thanks-all/m-p/176394#M6209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;i have a&amp;nbsp;problem with&amp;nbsp;memory mapping. For some reason ,I want to remap the register address space: 0x0000-0x3FFF, ram address space：0x0400-0x37FF, and eeprom：0x3800-0x3FFF. I use mc9s12dp512, P&amp;amp;E USB multilink interface tool. The process as follows.&lt;BR /&gt;1.&amp;nbsp;modify the prm files ,&lt;BR /&gt;/* RAM */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = READ_WRITE&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0400 TO&amp;nbsp;&amp;nbsp; 0x37FF;&lt;BR /&gt;/* EPROM */&lt;BR /&gt;EEPROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = READ_ONLY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x3800 TO&amp;nbsp;&amp;nbsp; 0x3FFF;&lt;BR /&gt;2.&amp;nbsp;in the start12.c file , join these commands :&lt;BR /&gt;INITRG = 0;&lt;BR /&gt;INITRM = 0;&lt;BR /&gt;INITEE = 0x31;&lt;BR /&gt;&amp;nbsp; 3. then in the main.c file ,define a globle const variable&lt;BR /&gt;const volatile unsigned char tst1 @ 0x3c00 = 0x0a;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;problem is&amp;nbsp; when run into the main() function, in my opinion, the tst1 should equal 0x0a, but actually , tst1 = 0xFF.&amp;nbsp; And the address content is also 0xff through memory window.&lt;/P&gt;&lt;P&gt;thanks for help !&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freescale.com%2Ffiles%2Fcommunity_files%2F16BITCOMM%2F7105_eeprom_test1.zip" rel="nofollow" target="_blank"&gt;eeprom_test1.zip&lt;/A&gt;&lt;/P&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-10-21&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:43 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2009 10:31:18 GMT</pubDate>
    <dc:creator>jeffzxg</dc:creator>
    <dc:date>2009-04-28T10:31:18Z</dc:date>
    <item>
      <title>problem with memory mapping!  thanks all!</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/problem-with-memory-mapping-thanks-all/m-p/176394#M6209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;i have a&amp;nbsp;problem with&amp;nbsp;memory mapping. For some reason ,I want to remap the register address space: 0x0000-0x3FFF, ram address space：0x0400-0x37FF, and eeprom：0x3800-0x3FFF. I use mc9s12dp512, P&amp;amp;E USB multilink interface tool. The process as follows.&lt;BR /&gt;1.&amp;nbsp;modify the prm files ,&lt;BR /&gt;/* RAM */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = READ_WRITE&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0400 TO&amp;nbsp;&amp;nbsp; 0x37FF;&lt;BR /&gt;/* EPROM */&lt;BR /&gt;EEPROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = READ_ONLY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x3800 TO&amp;nbsp;&amp;nbsp; 0x3FFF;&lt;BR /&gt;2.&amp;nbsp;in the start12.c file , join these commands :&lt;BR /&gt;INITRG = 0;&lt;BR /&gt;INITRM = 0;&lt;BR /&gt;INITEE = 0x31;&lt;BR /&gt;&amp;nbsp; 3. then in the main.c file ,define a globle const variable&lt;BR /&gt;const volatile unsigned char tst1 @ 0x3c00 = 0x0a;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;problem is&amp;nbsp; when run into the main() function, in my opinion, the tst1 should equal 0x0a, but actually , tst1 = 0xFF.&amp;nbsp; And the address content is also 0xff through memory window.&lt;/P&gt;&lt;P&gt;thanks for help !&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freescale.com%2Ffiles%2Fcommunity_files%2F16BITCOMM%2F7105_eeprom_test1.zip" rel="nofollow" target="_blank"&gt;eeprom_test1.zip&lt;/A&gt;&lt;/P&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-10-21&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:43 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 10:31:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/problem-with-memory-mapping-thanks-all/m-p/176394#M6209</guid>
      <dc:creator>jeffzxg</dc:creator>
      <dc:date>2009-04-28T10:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: problem with memory mapping!  thanks all!</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/problem-with-memory-mapping-thanks-all/m-p/176395#M6210</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;I think you have to check the following two conditions thoroughly ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. You have initialized both the registers "INITRG" and "INITRM" to the same value of zero in start12.c file. That means, you are telling the device to allocate the same memory for MCU Registers&amp;nbsp;and for RAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;I think you can not allign the RAM with start address of "0x0400" and EEPROM with "0x3800" in your prm file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggest you to check the freescale application note AN2881.pdf which is attached with this post to properly modify your memory mapping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2881.pdf" rel="nofollow" target="_self"&gt;AN2881.pdf&lt;/A&gt;&lt;/P&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-16&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:29 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2009 12:52:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/problem-with-memory-mapping-thanks-all/m-p/176395#M6210</guid>
      <dc:creator>nandu</dc:creator>
      <dc:date>2009-05-04T12:52:19Z</dc:date>
    </item>
  </channel>
</rss>

