Keil Logo Arm Logo

Usage of DDPUSE

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Karl Kalchgruber
Posted
20-Nov-2006 11:09 GMT
Toolset
C166
New! Usage of DDPUSE

Hello,
i'm using the XC164-µC with internal Ram at 0xC000-0xC7FF (DSRAM) & 0xF600-0xFDFF (DPRAM).

When I use 'standard' Target Layout Memory.
I get a Linker Section NDATA(0xC000-0xC7FF,0xF600-0xFDFF)
and I could use 4k (-Stacksize) for NEAR DATA.

If I would use more than 16kB for NCONST I select 32kB
for ROM in NEAR MEMORY-Section(@Target-Layout).

In L166 LOCATE I get following line:
DPPUSE (0=NDATA(0xC000 - 0xC7FF), 1=NCONST(0xC00000 - 0xC07FFF))

The DPRAM (0xF600-0xFDFF) is now not used for NEAR DATA!

How can I use this RAM also for NEAR DATA like in the case without DPPUSE?

ciao, Karl

Ps:The XC164-16CS claims that it has 8kB internal Data.
But I only found 2kB DSRAM (0xC000-0xC7FF), 2kB DPRAM(0xF600-0xFDFF) and 2kB PSRAM (0xE00000-0xE007FF).
Where are the remaining 2kB located?

Read-Only
Author
Joost Leeuwesteijn
Posted
20-Nov-2006 14:59 GMT
Toolset
C166
New! RE: Usage of DDPUSE

Hi Karl,

I don't no much about the XC164 specifically but maybe you could assign the whole range (C000-FDFF) in the DPPUSE directive and use the RESERVE directive to disable the areas where there's no RAM?

http://www.keil.com/support/man/docs/l166/l166_reserve.htm

Or take a look at the CLASSES directive and add the correct ranges for the NDATA class?

http://www.keil.com/support/man/docs/l166/l166_classes.htm

Ps:The XC164-16CS claims that it has 8kB internal Data. But I only found 2kB DSRAM (0xC000-0xC7FF), 2kB DPRAM(0xF600-0xFDFF) and 2kB PSRAM (0xE00000-0xE007FF). Where are the remaining 2kB located?

Doesn't the datasheet/user manual for an XC164 have a memory map?

Rergards,
Joost Leeuwesteijn

PS. What does DS(RAM), DP(RAM) and PS(RAM) stand for?

Read-Only
Author
Karl Kalchgruber
Posted
20-Nov-2006 18:58 GMT
Toolset
C166
New! RE: Usage of DDPUSE

@Joost:
It works to assign the whole adress range in DPPUSE and
define a smaller class for NDATA.

Thank you for the tip!

@Chris
Which Version of the XC164CS-16F System Manual do you have? I have Version 2.1(March 2004) from the Infineon Homepage. In this Document on page 3-3 the adressrange for DSRAM is 0xC000-0xC7FF.
But in the Datasheet for the XC164CS-16F they claim that there are 4kB DSRAM.
Now I have seen that the DataSheet is from March 2006.
Is there a newer Version of the System-Manual available?

Read-Only
Author
Chris Wunderlich
Posted
20-Nov-2006 20:41 GMT
Toolset
C166
New! RE: Usage of DDPUSE

No, I was looking at the 256k (32) version which has the same DSRAM amount as the 128k (16) version, 4KBytes.

Which is V1.0 (May 2004)

Read-Only
Author
Walter Conley
Posted
20-Nov-2006 21:20 GMT
Toolset
C166
New! RE: Usage of DDPUSE

According to our Infineon FAE, the -16F has always had 4k of DSRAM but Infineon only advertised and tested 2k of it which is why the 2004 datasheet says 0xC000-0xC7FF. They later decided to test and offer the entire 4k block which is relected in the newer datasheet.

Read-Only
Author
Karl Kalchgruber
Posted
21-Nov-2006 20:12 GMT
Toolset
C166
New! RE: Usage of DDPUSE

@Walter

In the Datasheet there is the statement of 4kB.
But they 'forget' to correct it in the Systemmanual
(and the Memorymap is only in the Systemmanual).

And in the Keil µVision there is also only the first 2kB mentioned.

Read-Only
Author
Joost Leeuwesteijn
Posted
21-Nov-2006 08:51 GMT
Toolset
C166
New! RE: Usage of DDPUSE

> @Joost:
> It works to assign the whole adress range in DPPUSE and
> define a smaller class for NDATA.
>
> Thank you for the tip!

You're welcome.

I'm using the whole range in DPPUSE in combination with RESERVE to "chip away" the reserved areas. DPPUSE already generates an NDATA class, see manual. DPPUSE also just sets a DPP register to a 16KB page so it doesn't really matter if the specified range is a bit smaller or larger, as long as it's in the 16KB page.
I would change it to select the whole 16KB page (C000-FFFF) to make clear a 16KB page is selected and then use RESERVE to disable the unusable areas, complete with comment to specify what the area contains, for example:

RESERVE (
          0x00F600-0x00FDFF,    ; SFR's
          0x00C800-0x00FFFF     ; unused
)

You can also choose to put the -whole- continuous memory range (from 00'0000 to MAXMEM) in the RESERVE directive, commenting out the sections that are NOT reserved but just to make clear what each area contains. That way you have one place where the whole map is explained. That's what I did.

Regards,
Joost Leeuwesteijn

Read-Only
Author
Chris Wunderlich
Posted
20-Nov-2006 17:17 GMT
Toolset
C166
New! RE: Usage of DDPUSE

If you are only using the internal RAM for the stack then I would not change from the default memory configuration as the DSRAM and SPRAM are located as NEAR using DPP3.

Perhaps there is a slight mistake in the Keil definition for the C164CS-16FF device as this should list 4KByte available for the SDRAM (0xC000 – 0xCFFF). The memory layout information is found in the System user's manual XC164 Memory Map (page 3-3).

What you can do is uncheck the option to use the on-chip XRAM and then define an External RAM memory starting at 0xC000 with a size of 0x1000. Don't worry about the external RAM as you are really using the internal memory (DSRAM).

Here is the listing from the map file for getting a 4Kbyte UserStack.

START     STOP      LENGTH    TYPE  RTYP  ALIGN  TGR  GRP  COMB  CLASS   SECTION NAME
================================================================
00C000H   00CFFFH   001000H   DATA  REL   WORD   ---    1  PUBL  NDATA   ?C_USERSTACK
00F600H   00F61FH   000020H   DATA  REL   WORD   ---    1  PUBL  NDATA   ?C_USERSTACK1
00F620H   00F63FH   000020H   DATA  REL   WORD   ---    1  PUBL  NDATA   ?C_USERSTACK2

Hope that helps

Read-Only
Author
Chris Wunderlich
Posted
20-Nov-2006 17:37 GMT
Toolset
C166
New! RE: Usage of DDPUSE

What does DS(RAM), DP(RAM) and PS(RAM) stand for?

DS(RAM) is single cycle access Data Static RAM.

DP(RAM) is Dual Ported static RAM.

PS(RAM) is Program Static RAM.

You can only execute code out of PSRAM but all can be used for data accesses.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings