<?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: What the problem to access variables in Paged Ram? in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854727#M7356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I hope you can check the variables of&amp;nbsp;astLecuCellVoltFilter and&amp;nbsp;au16LecuCellVolt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am not sure whether&amp;nbsp;they are wrong usage in the following function:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SWF_InitForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]), au16LecuCellVolt[i][j], 5, 20);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SWF_PushForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]), au16CellVoltData[i][j]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SWF_GetAverageValueForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Especially the pointers definition of&amp;nbsp;__rptr.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2019 09:27:05 GMT</pubDate>
    <dc:creator>赵子成</dc:creator>
    <dc:date>2019-01-09T09:27:05Z</dc:date>
    <item>
      <title>What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854713#M7342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I define the variables as follows:&lt;/P&gt;&lt;P&gt;static UINT16&amp;nbsp; au16CellVoltData[4][12];&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG __RPAGE_SEG PAGED_RAM&lt;BR /&gt;static ST_SLIDE_WIN_FILTER_FOR_FAR_BUF astLecuCellVoltFilter[4][12];&lt;BR /&gt;static UINT16 au16LecuCellVolt[4][12][5];&lt;BR /&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ST_SLIDE_WIN_FILTER_FOR_FAR_BUF is defined as :&lt;/P&gt;&lt;P&gt;typedef struct stSlideWinFilterForFarBuf_t&lt;BR /&gt;{&lt;BR /&gt; UINT16 *__rptr pu16Buf; //Pointer to the buffer define in&amp;nbsp;&lt;SPAN&gt;PAGED_RAM&lt;/SPAN&gt;&lt;BR /&gt; UINT16 u16Capacity;&lt;BR /&gt; UINT16 u16Tail;&amp;nbsp;&lt;BR /&gt; UINT16 u16ValidNum;&amp;nbsp;&lt;BR /&gt; UINT16 u16RestartRate;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}ST_SLIDE_WIN_FILTER_FOR_FAR_BUF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create a software Filter, I define the follow 3 functions:&lt;/P&gt;&lt;P&gt;******************************************************************************************************************************&lt;/P&gt;&lt;P&gt;void SWF_InitForFarBuf(ST_SLIDE_WIN_FILTER_FOR_FAR_BUF *__rptr pstFilter, UINT16 *__rptr pBuf, UINT16 u16Capacity, UINT16 u16RestartRate)&lt;BR /&gt;{&lt;BR /&gt; pstFilter-&amp;gt;pu16Buf = pBuf;&lt;BR /&gt; pstFilter-&amp;gt;u16Capacity = u16Capacity;&lt;BR /&gt; pstFilter-&amp;gt;u16ValidNum = 0;&lt;BR /&gt; pstFilter-&amp;gt;u16Tail = 0;&lt;BR /&gt; pstFilter-&amp;gt;u16RestartRate = u16RestartRate;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void SWF_PushForFarBuf(ST_SLIDE_WIN_FILTER_FOR_FAR_BUF *__rptr pstFilter, UINT16 uiLatestData)&lt;BR /&gt;{&lt;BR /&gt; SINT16 s16Diff;&lt;BR /&gt; UINT16 u16Diff;&lt;BR /&gt; UINT32 u32Last;&lt;/P&gt;&lt;P&gt;if(pstFilter-&amp;gt;u16ValidNum == 0)&lt;BR /&gt; {&lt;BR /&gt; pstFilter-&amp;gt;pu16Buf[0] = uiLatestData;&lt;BR /&gt; pstFilter-&amp;gt;u16Tail = 0;&lt;BR /&gt; pstFilter-&amp;gt;u16ValidNum = 1;&lt;/P&gt;&lt;P&gt;return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;u32Last = pstFilter-&amp;gt;pu16Buf[pstFilter-&amp;gt;u16Tail];&lt;BR /&gt; s16Diff = uiLatestData - u32Last;&lt;BR /&gt; u16Diff = CALC_ABS(s16Diff);&lt;/P&gt;&lt;P&gt;if(u16Diff &amp;gt; u32Last * pstFilter-&amp;gt;u16RestartRate / 100)&lt;BR /&gt; {&lt;BR /&gt; pstFilter-&amp;gt;pu16Buf[0] = uiLatestData;&lt;BR /&gt; pstFilter-&amp;gt;u16Tail = 0;&lt;BR /&gt; pstFilter-&amp;gt;u16ValidNum = 1;&lt;/P&gt;&lt;P&gt;return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; pstFilter-&amp;gt;u16Tail++;&lt;/P&gt;&lt;P&gt;if(pstFilter-&amp;gt;u16Tail &amp;gt;= pstFilter-&amp;gt;u16Capacity)&lt;BR /&gt; {&lt;BR /&gt; pstFilter-&amp;gt;u16Tail = 0;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;pstFilter-&amp;gt;pu16Buf[pstFilter-&amp;gt;u16Tail] = uiLatestData;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; pstFilter-&amp;gt;u16ValidNum++;&lt;/P&gt;&lt;P&gt;if(pstFilter-&amp;gt;u16ValidNum &amp;gt; pstFilter-&amp;gt;u16Capacity)&lt;BR /&gt; {&lt;BR /&gt; pstFilter-&amp;gt;u16ValidNum = pstFilter-&amp;gt;u16Capacity;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UINT16 SWF_GetAverageValueForFarBuf(ST_SLIDE_WIN_FILTER_FOR_FAR_BUF *__rptr pstFilter)&lt;BR /&gt;{&lt;BR /&gt; UINT32 uiSum = 0;&lt;BR /&gt; UINT16 i;&lt;BR /&gt; UINT16 uiAverage;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; if(pstFilter-&amp;gt;u16ValidNum == 0)&lt;BR /&gt; {&lt;BR /&gt; return 0;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; for(i = 0; i &amp;lt; pstFilter-&amp;gt;u16ValidNum; i++)&lt;BR /&gt; {&lt;BR /&gt; uiSum += pstFilter-&amp;gt;pu16Buf[i];&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;uiAverage = uiSum / pstFilter-&amp;gt;u16ValidNum;&lt;/P&gt;&lt;P&gt;return uiAverage;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;***************************************************************************************************************&lt;/P&gt;&lt;P&gt;I use these 3 function as follow:&lt;/P&gt;&lt;P&gt;for(i = 0; i &amp;lt; 4; i++)&lt;BR /&gt; {&lt;BR /&gt; for(j = 0; j &amp;lt; 12; j++)&lt;BR /&gt; {&lt;BR /&gt; SWF_InitForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]), au16LecuCellVolt[i][j], 5, 20);&lt;/P&gt;&lt;P&gt;SWF_PushForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]), au16CellVoltData[i][j]);&lt;BR /&gt; u16Data = SWF_GetAverageValueForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]));&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is that the data in&amp;nbsp;&lt;SPAN&gt;au16LecuCellVolt buffer is wrong sometimes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know why.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have look through the ducument of &amp;lt;TN238.pdf&amp;gt;,&amp;nbsp; maybe there is something wrong in the function about the Paged Ram buffer. Can anyone tell me why?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jan 2019 07:36:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854713#M7342</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-05T07:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854714#M7343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It always helps to create compilable project&amp;nbsp;demonstrating problem and sharing it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How big is your data in paged RAM? If more than 4k then try setting compiler-&amp;gt;Code Generation-&amp;gt;Assume object are in same&amp;nbsp;page for&amp;nbsp;= never for different objects.&amp;nbsp;Try also searching forum for -PSegObj, it was explained several times already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2019 21:12:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854714#M7343</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-01-06T21:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854715#M7344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The data in paged RAM is 3840 bytes(Less than 4K).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;And I have already set compier:&lt;SPAN&gt;setting compiler-&amp;gt;Code Generation-&amp;gt;Assume object are in same&amp;nbsp;page for&amp;nbsp;= never for different objects.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Also Add&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;-PSegObj.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Problem still exists.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 01:10:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854715#M7344</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-07T01:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854716#M7345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello 赵子成&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer attached demo code of how to access paged RAM .&lt;/P&gt;&lt;P&gt;If you can't open this demo project, set your IDE as "use text based project", restart CodeWarrior.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/71706i7EE3571C6A0BB3C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jun Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 04:47:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854716#M7345</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2019-01-07T04:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854717#M7346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked through your demo, I think my operation about variable(Even pointer to that variable) in Paged Ram is the same with you.&lt;/P&gt;&lt;P&gt;I still don't know what's wrong with my code.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 06:25:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854717#M7346</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-07T06:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854718#M7347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you must be mixing plain pointers with paged pointers. Please share compilable project to get further help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 07:23:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854718#M7347</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-01-07T07:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854719#M7348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;It is hard to share the project because the codes are very big.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I have shared the relatived codes above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;What you say "&lt;SPAN&gt;mixing plain pointers with paged pointers&lt;/SPAN&gt;", Can you explain this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Maybe this is a hint for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 08:53:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854719#M7348</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-07T08:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854720#M7349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't ask you to share production project. I ask you to create small project to demonstrate problem. Please respect those who offer you help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I have shared the relatived codes above.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;These are not compilable, tons of undefined symbols. Do you think it's very interesting to fill in the gaps? No, sorry&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 09:31:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854720#M7349</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-01-07T09:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854721#M7350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am so sorry.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I have created a&amp;nbsp;&lt;SPAN&gt;compilable project, but I found I can't upload the attachment. Maybe I have not enough right.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;I will&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;upload the project using other way tomorrow.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 12:17:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854721#M7350</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-07T12:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854722#M7351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, is your code working if you avoid R-page pointers and use simple pointers? You need to suppress #pragma __RPAGE_SEG line for this and add somewhere at top or in common header #pragma __rptr to make preprocessor hiding all __rprt's to compiler. If you can't do it because of lack of RAM, perhaps you can reproduce problem in your shareable prioject? &lt;/P&gt;&lt;P&gt;I tried making it working but don't see yet where __rprt's could fail. Would be nice to see some data which works well nonpaged and breaks with __rptr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 15:39:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854722#M7351</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-01-07T15:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854723#M7352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have uploaded the project.&lt;/P&gt;&lt;P&gt;I have to use the paged ram and global ram because of lacking of local ram(8K bytes).&lt;/P&gt;&lt;P&gt;In this project you can see&amp;nbsp;astLecuCellVoltFilter and&amp;nbsp;au16LecuCellVolt and&amp;nbsp;g_unParData are placed in&amp;nbsp;&lt;SPAN&gt;paged ram.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And&amp;nbsp;g_stLogBuf and&amp;nbsp;g_unVarData are placed in global ram.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And also you can see their address in &amp;lt;Bak_BMS_APP.map&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The problem is that the data in&amp;nbsp;au16LecuCellVolt sometimes become wrong.(The codes "u16Data = SWF_GetAverageValueForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]))"sometimes get wrong result.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am long for your help. Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2019 01:38:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854723#M7352</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-08T01:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854724#M7353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for project, but I'm unable to build it. First of all for some weird reason CW5.1 is unable to load&amp;nbsp;*.mcp as project. Renaming to XML and importing I get some rescued items and linker emits some messages which I don't understand, it doesn't build.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still questions arise.&amp;nbsp;We should be able to reproduce your situation. How? Any test data available? What steps are needed to initialize, run your functions and see some results which deviate from expected results?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing I forgot about. Since you say it is random, sometimes good and sometimes not, I guess it may be related to interrupts or preemptive RTOS.&amp;nbsp;Are you using paged variables (not necessarily the same, could be different *paged* variables) simultaneously from different preemptive tasks or [interrupts and main task]? If that's the case then you need to save/restore RPAGE&amp;nbsp;so that it is the same after return&amp;nbsp;to preempted task or from interrupt.&amp;nbsp;For second (interrupts and main) try enabling compiler options-&amp;gt;code generation-&amp;gt; RPAGE Register is used for paging. For preemptive RTOS perhaps you need to do some modifications in RTOS settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2019 07:46:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854724#M7353</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-01-08T07:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854725#M7354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;You can open CW5.1 and Edit-&amp;gt;Preferences-&amp;gt;IDE Extras-&amp;gt;Click Use text-based projects like below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And I don't use OS. The variable in paged RAM is only used in a single task(not interrupt).It is static variable, used only in one file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/71614i3C3A96ACADA9AFA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2019 09:27:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854725#M7354</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-08T09:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854726#M7355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, I figured "use text-based projects". It is the same as importing project as xml. In both cases I see rescued items and multiple include of&amp;nbsp;same files.&lt;/P&gt;&lt;P&gt;It builds after some manipulations, but it is still not clear what should I check, which data is sometimes wrong and sometimes good, how to see it? BTW, it is not necessarily RPAGE related, it could be something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 08:15:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854726#M7355</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-01-09T08:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854727#M7356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Edward,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I hope you can check the variables of&amp;nbsp;astLecuCellVoltFilter and&amp;nbsp;au16LecuCellVolt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am not sure whether&amp;nbsp;they are wrong usage in the following function:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SWF_InitForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]), au16LecuCellVolt[i][j], 5, 20);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SWF_PushForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]), au16CellVoltData[i][j]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SWF_GetAverageValueForFarBuf(&amp;amp;(astLecuCellVoltFilter[i][j]));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Especially the pointers definition of&amp;nbsp;__rptr.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 09:27:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854727#M7356</guid>
      <dc:creator>赵子成</dc:creator>
      <dc:date>2019-01-09T09:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: What the problem to access variables in Paged Ram?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854728#M7357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usage seems fine, as well __rptr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I asked you to check whether it works for you removing __rptr and #pragma.. __RPAGE_SEG... Is algorithm really OK? I can't check it without knowledge of what do you get and what do you expect, please provide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 09:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/What-the-problem-to-access-variables-in-Paged-Ram/m-p/854728#M7357</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2019-01-09T09:35:24Z</dc:date>
    </item>
  </channel>
</rss>

