Discussion Forum

Using C16x DPRAM

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

DetailsMessage
Read-Only
Author
Lucas Machado
Posted
11-Jan-2005 11:43 GMT
Toolset
None
New! Using C16x DPRAM
Hello;

How can I use DPRAM in XC167? I mean: how to correctly link a RAM memory area (in this derivative, 0xE0'0000 - 0xE0'1FFF) into one of the *CODE target classes?

My problem:

I followed all the linking steps in AppNote #138, including the SROM class and the FLASH_CODE section directives:
SROM (0xC00000-0xC1FFFF)

?PR?PFLASH%FLASH_CODE (0xE00000) [!]

I have also added in the External Memory #2:

RAM : 0xE00000 - 0x1FFF

But the debbuger still doesn't execute any code in this area (because uVision fits RAM External Memoryinto *DATA classes). If I add DPRAM as a "ROM" External Memory, my routine won't copy code to this area!


It seems like the ?PR?PFLASH section isn't working properly, has anyone a clue?

Thanks in advance,

Lucas
Read-Only
Author
Keil Reinhard
Posted
12-Jan-2005 08:42 GMT
Toolset
None
New! RE: Using C16x DPRAM
Take a look to:
http://www.keil.com/download/docs/xc16x_iap-flash.zip.asp

You may even run the code in the simulator when you are using the following command:
map 0xE00000, 0xE007FF exec read write
Read-Only
Author
Lucas Machado
Posted
14-Jan-2005 13:24 GMT
Toolset
C166
New! RE: Using C16x DPRAM
Hmmm.... I'm still not sure about my application, which is highly adapted from the AppNote #138 and the program you stated.

Does the "acces violation error" related to it mean this is a just debug error, "not automatically detected by µVision2" (as is in the HTML help) and it won't be an effective problem when I run this into the XC167?

FYI, the routine does not copy buffer data into the address I want. I consider the main question is : is the On-Chip Program Flash Module fully simulated by uVision?

Thanks in advance,

Lucas
Read-Only
Author
Keil Reinhard
Posted
14-Jan-2005 13:36 GMT
Toolset
C166
New! RE: Using C16x DPRAM
Use the MAP command as indicated in my answer to tell the uVision where you are using memory.

uVision does not (yet) simuluation the in-System Flash programming feature of the XC16x devices.

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