<?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>Xdata Variables not accessable</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/28580/xdata-variables-not-accessable</link><description> 
Dear Experts, 
I am a newbie to Keil and using the PK51 development kit with
Rev:9.03 to develop firmware for my CC2430 controller. 
The problem I am seeing is, when ever I create a large array (ex:
unsigned char a[20]) , I was unable to initialize</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/145066?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2011 07:08:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:23538b45-e36d-4bb1-94b6-f93c839e78de</guid><dc:creator>Rob van Schelven</dc:creator><description>&lt;p&gt;&lt;p&gt;
My phobia for dogs has always play a big role in my life ;-)&lt;/p&gt;

&lt;p&gt;
Thanks !!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/142848?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2011 06:34:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8f2ba7f8-8b80-404d-a692-ec69f27551a3</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
the ever repeated issue with SILabs deviates (f3x-up) is that the
watchdog is enabled at reset. The startup code does not feed the dog,
so it bites.&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;at the start of startup.a51&lt;/b&gt; (prefererably a local copy)
disable the watchdog and enable it asgain at th top of main.&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/139881?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2011 04:47:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:58ec2a9b-a229-4cec-a3f6-0f41d15e70ab</guid><dc:creator>Rob van Schelven</dc:creator><description>&lt;p&gt;&lt;p&gt;
In the meantime i have tested with single stepping and discovered
that it goes wrong when the DPTR reaches 0x00EA. executing MOVX
@DPTR,A with a DPTR of 0x00EA restarts the MCU.. I assume this is a
question for Silicon Labs.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/136429?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2011 04:06:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5c689257-453d-4042-a8cf-20c63e788df3</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Have you used the on-chip debug to step through and see where,
exactly, it fails?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/126763?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2011 03:11:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2248f235-d12c-4a33-9de6-ce318867c088</guid><dc:creator>Rob van Schelven</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, the chip (Silabs C8051F920) has XRAM of 4096 bytes in the
range of 0x0000 - 0x0FFF&lt;br /&gt;
As far as i found out there is nothing special to do related to SFR
to access the full 4K.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/119199?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2011 02:37:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:66992e4a-dbe8-4a1f-affd-aa0ec04aadd4</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Does your particular chip actually have &amp;gt; 256 bytes XRAM?&lt;/p&gt;

&lt;p&gt;
Have you correctly configured and/or enabled it?&lt;br /&gt;
See the &lt;b&gt;&lt;i&gt;chip&lt;/i&gt; datasheet&lt;/b&gt; for specific details, SFRs,
etc,...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/84738?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2011 02:25:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b4aefad9-79a1-437b-9bc1-c7f09dee6f84</guid><dc:creator>Rob van Schelven</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
Is this problems solved? I encounter the same problem. When
XDATALEN &amp;lt; 256 bytes it works fine.&lt;br /&gt;
Larger values restart the code @ address 0x0000.&lt;/p&gt;

&lt;p&gt;
Thanks,&lt;br /&gt;
Rob&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/79150?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2011 08:58:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9bf7e362-4ba2-4d21-a04f-c9f25cc9c3f4</guid><dc:creator>Ramya Desai</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks for the help.&lt;br /&gt;
Here is the modified STARTUP.A51, with which the code hangs after
executing a couple of functions. I am sorry for asking to analyze the
whole file.&lt;br /&gt;
-RD&lt;/p&gt;

&lt;pre&gt;
$NOMOD51

STACKSIZE   EQU 0x85                    ; must not exceed IDATA SEG

;------------------------------------------------------------------------------
;
;  User-defined &amp;lt;h&amp;gt; Power-On Initialization of Memory
;
;  With the following EQU statements the initialization of memory
;  at processor reset can be defined:
;
; &amp;lt;o&amp;gt; IDATALEN: IDATA memory size &amp;lt;0x0-0x100&amp;gt;
;     &lt;i&gt; Note: The absolute start-address of IDATA memory is always 0
;     &lt;/i&gt;       The IDATA space overlaps physically the DATA and BIT areas.
IDATALEN        EQU     0 ;080H
;
; &amp;lt;o&amp;gt; XDATASTART: XDATA memory start address &amp;lt;0x0100-0xFFFF&amp;gt;
;     &lt;i&gt; The absolute start address of XDATA memory
;XDATASTART      EQU     0x0100
XDATASTART      EQU     0x0
;
; &amp;lt;o&amp;gt; XDATALEN: XDATA memory size &amp;lt;0xE000-0xFD55&amp;gt;
;     &lt;/i&gt; The length of XDATA memory in bytes.
;XDATALEN        EQU     0x1000
XDATALEN        EQU     0x0
;
; &amp;lt;o&amp;gt; PDATASTART: PDATA memory start address &amp;lt;0x0-0xFFFF&amp;gt;
;     &lt;i&gt; The absolute start address of PDATA memory
PDATASTART      EQU     0x00
;
; &amp;lt;o&amp;gt; PDATALEN: PDATA memory size &amp;lt;0x0-0xFF&amp;gt;
;     &lt;/i&gt; The length of PDATA memory in bytes.
PDATALEN        EQU     0H
;
;&amp;lt;/h&amp;gt;
;------------------------------------------------------------------------------
;
;&amp;lt;h&amp;gt; Reentrant Stack Initialization
;
;  The following EQU statements define the stack pointer for reentrant
;  functions and initialized it:
;
; &amp;lt;h&amp;gt; Stack Space for reentrant functions in the SMALL model.
;  &amp;lt;q&amp;gt; IBPSTACK: Enable SMALL model reentrant stack
;     &lt;i&gt; Stack space for reentrant functions in the SMALL model.
IBPSTACK        EQU     0       ; set to 1 if small reentrant is used.
;  &amp;lt;o&amp;gt; IBPSTACKTOP: End address of SMALL model stack &amp;lt;0x0-0xFF&amp;gt;
;     &lt;/i&gt; Set the top of the stack to the highest location.
IBPSTACKTOP     EQU     0xFF +1     ; default 0FFH+1
; &amp;lt;/h&amp;gt;
;
; &amp;lt;h&amp;gt; Stack Space for reentrant functions in the LARGE model.
;  &amp;lt;q&amp;gt; XBPSTACK: Enable LARGE model reentrant stack
;     &lt;i&gt; Stack space for reentrant functions in the LARGE model.
XBPSTACK        EQU     1       ; set to 1 if large reentrant is used.
;  &amp;lt;o&amp;gt; XBPSTACKTOP: End address of LARGE model stack &amp;lt;0x0-0xFFFF&amp;gt;
;     &lt;/i&gt; Set the top of the stack to the highest location.
XBPSTACKTOP     EQU     0x1EFF +1 ; 0x1EFF +1
; &amp;lt;/h&amp;gt;
;
; &amp;lt;h&amp;gt; Stack Space for reentrant functions in the COMPACT model.
;  &amp;lt;q&amp;gt; PBPSTACK: Enable COMPACT model reentrant stack
;     &lt;i&gt; Stack space for reentrant functions in the COMPACT model.
PBPSTACK        EQU     0       ; set to 1 if compact reentrant is used.
;
;   &amp;lt;o&amp;gt; PBPSTACKTOP: End address of COMPACT model stack &amp;lt;0x0-0xFFFF&amp;gt;
;     &lt;/i&gt; Set the top of the stack to the highest location.
PBPSTACKTOP     EQU     0xFF +1     ; default 0FFH+1
; &amp;lt;/h&amp;gt;
;&amp;lt;/h&amp;gt;
;------------------------------------------------------------------------------
;
;  Memory Page for Using the Compact Model with 64 KByte xdata RAM
;  &amp;lt;e&amp;gt;Compact Model Page Definition
;
;  &lt;i&gt;Define the XDATA page used for PDATA variables.
;  &lt;/i&gt;PPAGE must conform with the PPAGE set in the linker invocation.
;
; Enable pdata memory page initalization
PPAGEENABLE     EQU     0       ; set to 1 if pdata object are used.
;
; &amp;lt;o&amp;gt; PPAGE number &amp;lt;0x0-0xFF&amp;gt;
; &lt;i&gt; uppermost 256-byte address of the page used for PDATA variables.
PPAGE           EQU     0
;
; &amp;lt;o&amp;gt; SFR address which supplies uppermost address byte &amp;lt;0x0-0xFF&amp;gt;
; &lt;/i&gt; most 8051 variants use P2 as uppermost address byte
PPAGE_SFR       DATA    0A0H
;
; &amp;lt;/e&amp;gt;
;------------------------------------------------------------------------------

; Standard SFR Symbols
;
ACC     DATA    0E0H
B       DATA    0F0H
SP      DATA    81H
DPL0    DATA    82H
DPH0    DATA    83H
DPL1    DATA    84H
DPH1    DATA    85H
DPS     DATA    92H

                NAME    ?C_STARTUP


?C_C51STARTUP   SEGMENT   CODE


?STACK                                 SEGMENT   IDATA
                                                                RSEG     ?STACK
                                                                DS           STACKSIZE


                EXTRN CODE (?C_START)
                PUBLIC  ?C_STARTUP

                CSEG    AT      0
?C_STARTUP:     LJMP    STARTUP1

                RSEG    ?C_C51STARTUP

STARTUP1:

IF IDATALEN &amp;lt;&amp;gt; 0
                MOV     R0,#IDATALEN - 1
                CLR     A
IDATALOOP:      MOV     @R0,A
                DJNZ    R0,IDATALOOP
ENDIF

IF XDATALEN &amp;lt;&amp;gt; 0
                MOV     DPTR,#XDATASTART
                MOV     R7,#LOW (XDATALEN)
  IF (LOW (XDATALEN)) &amp;lt;&amp;gt; 0
                MOV     R6,#(HIGH (XDATALEN)) +1
  ELSE
                MOV     R6,#HIGH (XDATALEN)
  ENDIF
                CLR     A
XDATALOOP:      MOVX    @DPTR,A
                INC     DPTR
                DJNZ    R7,XDATALOOP
                DJNZ    R6,XDATALOOP
ENDIF

IF PPAGEENABLE &amp;lt;&amp;gt; 0
                MOV     PPAGE_SFR,#PPAGE
ENDIF

IF PDATALEN &amp;lt;&amp;gt; 0
                MOV     R0,#LOW (PDATASTART)
                MOV     R7,#LOW (PDATALEN)
                CLR     A
PDATALOOP:      MOVX    @R0,A
                INC     R0
                DJNZ    R7,PDATALOOP
ENDIF

IF IBPSTACK &amp;lt;&amp;gt; 0
EXTRN DATA (?C_IBP)

                MOV     ?C_IBP,#LOW IBPSTACKTOP
ENDIF

IF XBPSTACK &amp;lt;&amp;gt; 0
EXTRN DATA (?C_XBP)

                MOV     ?C_XBP,#HIGH XBPSTACKTOP
                MOV     ?C_XBP+1,#LOW XBPSTACKTOP
ENDIF

IF PBPSTACK &amp;lt;&amp;gt; 0
EXTRN DATA (?C_PBP)
                MOV     ?C_PBP,#LOW PBPSTACKTOP
ENDIF

                MOV     SP,#?STACK-1

; This code is required if you use L51_BANK.A51 with Banking Mode 4
;&amp;lt;h&amp;gt; Code Banking
; &amp;lt;q&amp;gt; Select Bank 0 for L51_BANK.A51 Mode 4
#if 0
;     &lt;i&gt; Initialize bank mechanism to code bank 0 when using L51_BANK.A51 with Banking Mode 4.
EXTRN CODE (?B_SWITCH0)
                CALL    ?B_SWITCH0      ; init bank mechanism to code bank 0
#endif
;&amp;lt;/h&amp;gt;
                LJMP    ?C_START

                END
&lt;/i&gt;
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Xdata Variables not accessable</title><link>https://community.arm.com/thread/59289?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2011 08:34:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3ee28b05-9acb-4791-abfb-fc9331731a3e</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;XDATASTART EQU 0x0100&lt;/i&gt;&lt;br /&gt;
why not 0?&lt;br /&gt;
&lt;i&gt;MOVX @DPTR,A INC DPTR DJNZ R7,XDATALOOP DJNZ R6,XDATALOOP&lt;/i&gt;&lt;br /&gt;
why post unreadable, why initailize 64k when you only have 8, the
time sounds right&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>