<?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: Put A array in Paged RAM and the Array index is a variable -Addressing error in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Put-A-array-in-Paged-RAM-and-the-Array-index-is-a-variable/m-p/1160755#M17489</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;on the basis of memory model the variables and pointers are far or near in default. Because I do not see entire project to see everything I think better is to share an example code you can test. Moreover, it is necessary to correctly understand memory map and addressing modes.&lt;/P&gt;
&lt;P&gt;Please look into attachment. I suppose you use XEP100 device.&lt;/P&gt;
&lt;P&gt;I believe it will help you.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 14:19:24 GMT</pubDate>
    <dc:creator>lama</dc:creator>
    <dc:date>2020-09-29T14:19:24Z</dc:date>
    <item>
      <title>Put A array in Paged RAM and the Array index is a variable -Addressing error</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Put-A-array-in-Paged-RAM-and-the-Array-index-is-a-variable/m-p/1158201#M17462</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I wanted to put some data into paged RAM, including arrays, but when I tested it, I found an addressing exception if the index of the array was a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Below are the test cases and the results:&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="test example" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/126032iC641564AAA76C28B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="test.png" alt="test example" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;test example&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Result.png" style="width: 329px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/126036iA9FFD384440E9BBF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Result.png" alt="Result.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;The result shows that the index of the array was a variable addressing error, and the index of the array was a&amp;nbsp;&amp;nbsp;constant&amp;nbsp;addressing&amp;nbsp;correct.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tran"&gt;&amp;nbsp; &amp;nbsp; How&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="tran"&gt;can&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="tran"&gt;I&lt;/SPAN&gt;&amp;nbsp;get&amp;nbsp;&lt;SPAN class="tran"&gt;around&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="tran"&gt;this&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="tran"&gt;issue&lt;/SPAN&gt;? Could&amp;nbsp;&lt;SPAN class="tran"&gt;someone&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="tran"&gt;please&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="tran"&gt;explain&lt;/SPAN&gt;&amp;nbsp;in more detail&amp;nbsp;&lt;SPAN class="tran"&gt;how&lt;/SPAN&gt;&amp;nbsp;to&amp;nbsp;&lt;SPAN class="tran"&gt;solve&amp;nbsp;&lt;/SPAN&gt;this&amp;nbsp;&lt;SPAN class="tran highlight"&gt;problem&lt;/SPAN&gt;?&amp;nbsp;&lt;SPAN class="tran"&gt;Thanks a bunch!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 01:38:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Put-A-array-in-Paged-RAM-and-the-Array-index-is-a-variable/m-p/1158201#M17462</guid>
      <dc:creator>suomichen</dc:creator>
      <dc:date>2020-09-24T01:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Put A array in Paged RAM and the Array index is a variable -Addressing error</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Put-A-array-in-Paged-RAM-and-the-Array-index-is-a-variable/m-p/1160755#M17489</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;on the basis of memory model the variables and pointers are far or near in default. Because I do not see entire project to see everything I think better is to share an example code you can test. Moreover, it is necessary to correctly understand memory map and addressing modes.&lt;/P&gt;
&lt;P&gt;Please look into attachment. I suppose you use XEP100 device.&lt;/P&gt;
&lt;P&gt;I believe it will help you.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:19:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Put-A-array-in-Paged-RAM-and-the-Array-index-is-a-variable/m-p/1160755#M17489</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2020-09-29T14:19:24Z</dc:date>
    </item>
  </channel>
</rss>

