|
C167CS - can't access XRAM @0xC000Next Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Hari Bahra Posted 2-Dec-2004 10:01 Toolset C166 |  C167CS - can't access XRAM @0xC000 Hari Bahra Can any one tell me how to access the XRAM at address 0xC000 on the C167CS.
I have :- - ticked 'use on-chip xram' - added XRAM class in linker file is as follows :-
CLASSES (ICODE(000000h),
IDATA0(00F600h),
SDATA(00E000h-00E7FFh),
SDATA0(00E000h-00E7FFh),
XRAM(00C000h-00D7FFh),
NCODE(010000h-013FFFh),
.... etc
- used the RENAMECLASSE control at the top of my 'Debug.c' file and allocated some XRAM memory as follows
#pragma RENAMECLASS(SDATA = XRAM)
#pragma NOINIT
static int sdata Temp[20];
The resulting .m66 file looks encouraging ...
START STOP LENGTH TYPE RTYP ALIGN TGR GRP COMB CLASS SECTION NAME
=====================================================================================
00C000H 00C027H 000028H DATA REL WORD --- 2 PUBL XRAM ?SD?DEBUG
But it doesn't work - the XRAM is not accessible. Any ideas anyone ??
Regards
Hari | | Read-Only Author Walt Conley Posted 2-Dec-2004 10:58 Toolset C166 |  RE: C167CS - can't access XRAM @0xC000 Walt Conley Have you tried this?
http://www.keil.com/support/docs/1621.htm | | Read-Only Author Hari Bahra Posted 3-Dec-2004 09:43 Toolset C166 |  RE: C167CS - can't access XRAM @0xC000 Hari Bahra Thanks for responding.
Yes I have enabled XPEN in SYSCON register.
I don't have any trouble with XRAM at addres 0xE000. I only have trouble accessing the XRAM at 0xC000. | | Read-Only Author Brad Holeman Posted 6-Dec-2004 11:40 Toolset C166 |  RE: C167CS - can't access XRAM @0xC000 Brad Holeman I would double check to make sure that you are indeed enabling all of XRAM.
MOV XPERCON,#0C03H ; Enable CAN 1 and CAN 2 Xbus peripherals
; Enable XRAM 2 KByte memory
; Enable XRAM 6 KByte memory
NOP
NOP
MOV SYSCON,#8184H ; Stack size = 512 words
; Internal rom starts at 00'0000
; Segmentation enabled
; Internal rom disabled
; BHE pin enabled
; Clock out pin enabled
; WR is write low, BHE is write high
; Xbus peripherals are enabled
; Xbus accesses are not visible on external bus
; Xbus peripherals not accessable on external bus
Additionally try this in your linker file,
SDATA0 (C000H-D7FFH, E000H-E7FFH)
| | Read-Only Author Brad Holeman Posted 6-Dec-2004 13:32 Toolset C166 |  RE: C167CS - can't access XRAM @0xC000 Brad Holeman Hari,
The above works for sure because we are using with our C167CS. | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|