<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>P89C51RD2Hxx: How to configure XRAM to 32K</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/16637/p89c51rd2hxx-how-to-configure-xram-to-32k</link><description> Hi, 
 
Would anyone please advise me the steps as how to configure the settings [startup.a51]?? so that program can access or allocate XDATA varibales in 32K memory size?? 
 
Thanking you in advance. 
 
Cheers, 
Simon </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: P89C51RD2Hxx: How to configure XRAM to 32K</title><link>https://community.arm.com/thread/118862?ContentTypeID=1</link><pubDate>Wed, 20 Aug 2003 12:58:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:65dbbea3-e80d-49d7-a76c-1146dd48c222</guid><dc:creator>Simon Pun</dc:creator><description>&lt;p&gt;Hi Bob,&lt;br /&gt;
&lt;br /&gt;
I am so glad to receive your reply and thank you so much for your kind advice. It saved me a lot of time....and now I can go to enjoy a cup of coffee.&lt;br /&gt;
&lt;br /&gt;
Thanks again and have a nice day.&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P89C51RD2Hxx: How to configure XRAM to 32K</title><link>https://community.arm.com/thread/95675?ContentTypeID=1</link><pubDate>Wed, 20 Aug 2003 09:01:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2df57039-a5a5-4d1e-996f-243b54d80820</guid><dc:creator>Bob Horeck</dc:creator><description>&lt;p&gt;I use that chip a lot.  Your setting of AUXR is correct.  If you have any PDATA or XDATA variables that are initialized at compile time (have values prior to executing Main), you need to set AUXR in STARTUP.A51.  Do it immediately after the label &amp;quot;STARTUP1:&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
STARTUP calls C_Start to initialize variables after clearing RAM.  Thus, it needs to have AUXR set correctly or internal RAM will be used for the first 256/768 (RC2/RD2) bytes of XDATA.&lt;br /&gt;
&lt;br /&gt;
Also, be careful with P2.  If you use PDATA make sure it points to the correct page for your data.&lt;br /&gt;
&lt;br /&gt;
Just a final note.  I always add the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;sfr   CKCON = 0x8F;             // Clock control register  &lt;/pre&gt;
&lt;br /&gt;
The latest production of the chip drops the &amp;quot;H&amp;quot; and adds the clock control register.  In your main program initialization set CKCON=1.  This forces use of a 6x clock and allows all the peripheral devices (timers etc) to run at full speed.  The instruction execution on an &amp;quot;H&amp;quot; variate has no ill effects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P89C51RD2Hxx: How to configure XRAM to 32K</title><link>https://community.arm.com/thread/118861?ContentTypeID=1</link><pubDate>Tue, 19 Aug 2003 12:24:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3162a06e-5cd9-4292-a02f-d6f04ff2fdbd</guid><dc:creator>Simon Pun</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;br /&gt;
&lt;br /&gt;
Thanks for your reply. I&amp;#39;ll work on it and see how it will come out.&lt;br /&gt;
&lt;br /&gt;
Your advice is appreciated.&lt;br /&gt;
&lt;br /&gt;
Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P89C51RD2Hxx: How to configure XRAM to 32K</title><link>https://community.arm.com/thread/95677?ContentTypeID=1</link><pubDate>Tue, 19 Aug 2003 05:35:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:14157657-cbe9-4ec9-a965-a19be890b018</guid><dc:creator>John Donaldson</dc:creator><description>&lt;p&gt;I didn&amp;#39;t notice that you had specified the derivative in the subject line. Unfortunately I don&amp;#39;t know anything about this derivative, maybe someone else can answer your question.&lt;br /&gt;
&lt;br /&gt;
It&amp;#39;s a good idea to include all the pertinent information in the body of the message.&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P89C51RD2Hxx: How to configure XRAM to 32K</title><link>https://community.arm.com/thread/71738?ContentTypeID=1</link><pubDate>Tue, 19 Aug 2003 03:36:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5b235f9f-18f9-4309-98be-4cf9977bfe86</guid><dc:creator>Simon Pun</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;br /&gt;
&lt;br /&gt;
My test program works with internal ERAM 768 bytes, like XRAM. When I install 32K RAM board, and with xdata variable declared to a larger size, it is not working.&lt;br /&gt;
&lt;br /&gt;
I have studied the data sheet and it says that AUXR register is required to set to 0x03 to enable&lt;br /&gt;
1. ALE active with MOVX or MOVC instruction&lt;br /&gt;
[AO=1]&lt;br /&gt;
2. to enable external data memory access&lt;br /&gt;
[EXTRAM=1]&lt;br /&gt;
&lt;br /&gt;
As there are a number of things I have to check, such as the memory board...etc., I would appreciate very much of your advice on&lt;br /&gt;
&lt;br /&gt;
whether the AURX=0x03 is set/ declared in the main program or in the startup.a51 file so that I can focus on trouble shooting other possibilites.&lt;br /&gt;
&lt;br /&gt;
Thank you very much for your time and advice.&lt;br /&gt;
&lt;br /&gt;
Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P89C51RD2Hxx: How to configure XRAM to 32K</title><link>https://community.arm.com/thread/40712?ContentTypeID=1</link><pubDate>Fri, 15 Aug 2003 03:18:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:43492d30-f0e3-4a4a-aa58-ddf8b137eaa3</guid><dc:creator>John Donaldson</dc:creator><description>&lt;p&gt;Unless you have some strange derivative you don&amp;#39;t need to modify startup.a51. Just make sure you&amp;#39;ve specified the correct size and start address for your xdata memory in Target-&amp;gt;Options then declare variables with the xdata keyword:&lt;br /&gt;
&lt;br /&gt;
int xdata foo;&lt;br /&gt;
&lt;br /&gt;
A good &amp;quot;reading of the manual&amp;quot; wouldn&amp;#39;t do any harm either.&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>