In the example gel file for the C6678 EVM (in my installation; C:\ti\ccsv5\ccs_base_5.0.3.00028\emulation\boards\evmc6678l\gel\evmc6678l.gel) there is a function called xmc_setup(), doing this:
/* mapping for ddr emif registers XMPAX*2 */
XMPAX2_L = 0x100000FF; /* replacement addr + perm*/
XMPAX2_H = 0x2100000B; /* base addr + seg size (64KB)*/ //"1B"-->"B" by xj
I'm trying to understand it to see if I need to do something similar in my startup code, can someone please explain?
I think I know the XMC basics from reading chapter 7 in CorePac User's guide (sprugw0b).
It seems to me that the gel code sets up MPAX segment 2 for remapping:
from ===> 0x2100.0xxx (i.e. size is 4kB, not 64 kB as claimed by the comment)
to ====> first 4 kB of DDR3 external memory, at 8:0x8000.0xxx
If I understand this right, this segment 2 therefore is overlapping segment 1 that seems to map to start of DDR3 external memory, at 8:0x8000.0xxx.
Basically, the memories conflict? If this is correct, what is the purpose of this? Is it necessary, and why?
The DDR3 controller document states that its control registers are memory mapped to 0x2100.0000 and that the data manual specifies the mapped memory address. However, sprs691b just repeats the address 0x2100.0000...?
Confused right now, maybe because it's friday :-)
BR /Marty