We recently switched from using 9s12dp256 to 9s12dp512. 512 has default memory map of starting address 0x400 -> 0x7ff (1KB) of EEPROM. 14 KB of RAM starting @ 0x800 and 1 KB of register space starting @ 0x000. Trying to re-map this memory space to 3KB of EEPROM, 12 KB of RAM seems to be a challenge.
We use COSMIC for IDE.
I have setup 0x400 through 0xfff (3KB) for EEPROM
0x1000 through 0x3fff (12 KB) for RAM in the linker file supplied by COSMIC. The stack pointer is set to 0x3fff
My initialization code has the register settings for INITRG = 0x0; INITRM = 0x11; INITEE = 0x01
I have tried different variations to these settings all with the result that EEPROM does not work as it is intended. RAM seems to take over the area that I define for EEPROM. I have read through engineering bulletin EB368 posted in this website. There are couple of examples in pages 17-19 in the bulletin. The examples in this bulletin is what I have been trying. It just doesn't work.
Having said that, with the default memory map for the 512 processor, I can get the 1 KB of EEPROM to work. We need 3 KB atleast 2 KB.