how to access of EEE RAM from C code?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to access of EEE RAM from C code?

707 Views
grzegorzK
Contributor III

Hi

 

I configured EEE RAM as shown in attachment, my problem is: how to access this global address from C code? as shown on attachment global address is 0x13FF00, as I understand it is not easy access it as pointer? Or I am wrong?

 

Regards

/Greg

Labels (1)
0 Kudos
3 Replies

386 Views
kef
Specialist I

Global addresses 13ff00-13ff00 are available in nonbanked memory at 0x0F00.

There are no problems accessing both. To access global address you need far memory pointer.

 

But is it convenient or something to access EEE using pointer and not allocating some variables there? I think it is better to access directly named variables. I would go to Build options, add new NO_INIT segment at 0xF00. Then customize placement to place EEE to that segment. Then you could allocate your variables directly to EEE:

 

#pragma DATA_SEG EEE

int myeeevar1;

int myeeevar2;

...

#pragma DATA_SEG DEFAULT

0 Kudos

386 Views
grzegorzK
Contributor III

kef wrote:

Global addresses 13ff00-13ff00 are available in nonbanked memory at 0x0F00.




Thank you, works!

However I am looking document what will in details describe how this is mapped. I see in AN3743_EEE_quick_start.pdf

 

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3743.pdf?fpsp=1&WT_TYPE=Application...

 

on page 2 there is a local map, but there is no address for "Local map", only for "global map". How I can find out where every from 16 (16 = max) EEE_RAM pages are maped to address in "local map"? PRM file? build options in Processor Expert?

 

Regards

/Greg.

0 Kudos

386 Views
kef
Specialist I

It is specified in datasheet. Datasheet is your information source #1, all others start from #10 or more :smileyhappy:.

 

PRM and PE not define EE mapping, they only should be consistent with what is written in datasheet.

 

0 Kudos