<?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>CodeWarrior for MCUのトピックGPAGE question</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/GPAGE-question/m-p/181262#M6166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to migrate some code from S12C to S12XDT256. I have a memory read function that &amp;nbsp;takes a pointer to far pointer as argument, loads a and transmits a series of CAN messages with&amp;nbsp;four bytes of data together with the address of the first byte in each message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Read consecutive bytes from memory on same pagestatic void ReadMem( dword *far *ppFarAddress, word len ){&amp;nbsp; _CANSTR CanTxMsg;&amp;nbsp; CanTxMsg.Byte.Idr0 = READ_MEM_ECHO_MSG;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (len != 0)&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; *(dword *far *)&amp;amp;CanTxMsg.Array[CAN_DB0] = *ppFarAddress;&amp;nbsp; // copy address&amp;nbsp;&amp;nbsp;&amp;nbsp; *(dword *)&amp;amp;CanTxMsg.Array[CAN_DB3] = **ppFarAddress;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // copy 4 bytes data&amp;nbsp;&amp;nbsp;&amp;nbsp; if (len &amp;gt; 3)&amp;nbsp;&amp;nbsp;&amp;nbsp; // full msg?&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CanTxMsg.Byte.Dlc.U8 = 7;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len -= 4;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // remaining bytes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *ppFarAddress += 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // point to next address&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; else&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; // last msg&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CanTxMsg.Byte.Dlc.U8 = len + 3;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // done&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; CanSendMsg( &amp;amp;CanTxMsg );&amp;nbsp;&amp;nbsp; KickDog();&amp;nbsp;&amp;nbsp; DelayXus(8000);&amp;nbsp;&amp;nbsp;&amp;nbsp; // 8 ms intermission between transmissions.&amp;nbsp; }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This code works fine in the S12C, but in S12XDT256, I can see from the assembly listing that GPAGE gets involved, which as far as I can tell is read only in bit 7. Anyways the messages are not transmitting the expected data, but the address reads ok. Guess I don't understand the concept of GPAGE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated, thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Håkan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:31:19 GMT</pubDate>
    <dc:creator>crane</dc:creator>
    <dc:date>2020-10-29T09:31:19Z</dc:date>
    <item>
      <title>GPAGE question</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/GPAGE-question/m-p/181262#M6166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to migrate some code from S12C to S12XDT256. I have a memory read function that &amp;nbsp;takes a pointer to far pointer as argument, loads a and transmits a series of CAN messages with&amp;nbsp;four bytes of data together with the address of the first byte in each message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Read consecutive bytes from memory on same pagestatic void ReadMem( dword *far *ppFarAddress, word len ){&amp;nbsp; _CANSTR CanTxMsg;&amp;nbsp; CanTxMsg.Byte.Idr0 = READ_MEM_ECHO_MSG;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (len != 0)&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; *(dword *far *)&amp;amp;CanTxMsg.Array[CAN_DB0] = *ppFarAddress;&amp;nbsp; // copy address&amp;nbsp;&amp;nbsp;&amp;nbsp; *(dword *)&amp;amp;CanTxMsg.Array[CAN_DB3] = **ppFarAddress;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // copy 4 bytes data&amp;nbsp;&amp;nbsp;&amp;nbsp; if (len &amp;gt; 3)&amp;nbsp;&amp;nbsp;&amp;nbsp; // full msg?&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CanTxMsg.Byte.Dlc.U8 = 7;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len -= 4;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // remaining bytes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *ppFarAddress += 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // point to next address&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; else&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; // last msg&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CanTxMsg.Byte.Dlc.U8 = len + 3;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // done&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; CanSendMsg( &amp;amp;CanTxMsg );&amp;nbsp;&amp;nbsp; KickDog();&amp;nbsp;&amp;nbsp; DelayXus(8000);&amp;nbsp;&amp;nbsp;&amp;nbsp; // 8 ms intermission between transmissions.&amp;nbsp; }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This code works fine in the S12C, but in S12XDT256, I can see from the assembly listing that GPAGE gets involved, which as far as I can tell is read only in bit 7. Anyways the messages are not transmitting the expected data, but the address reads ok. Guess I don't understand the concept of GPAGE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated, thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Håkan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:31:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/GPAGE-question/m-p/181262#M6166</guid>
      <dc:creator>crane</dc:creator>
      <dc:date>2020-10-29T09:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: GPAGE question</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/GPAGE-question/m-p/181263#M6167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found explanation in datapage.c&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 21:11:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/GPAGE-question/m-p/181263#M6167</guid>
      <dc:creator>crane</dc:creator>
      <dc:date>2011-02-03T21:11:59Z</dc:date>
    </item>
  </channel>
</rss>

