#if defined(_HCS12_SERIALMON) /* for Monitor based software remap the RAM & EEPROM to adhere to EB386. Edit RAM and EEPROM sections in PRM file to match these. */ ___INITRG = 0x00; /* lock registers block to 0x0000 */ ___INITRM = 0x39; /* lock Ram to end at 0x3FFF */ ___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */#endif
But, i have the follwoing two questions on this,
1. Can anyone please tell me how to enable this Serial Monitor code to re-map the memory in the MCU.
2. And imagine if the Serial Monitor is enabled, and the initialization of registers (INITRG = 0x00, INITRM = 0x39, and INITEE = 0x09) has become effective, what will be the starting address for the RAM or what are the boundaries of RAM in the whole memory map.
According to the above snippset, it says the ending address of the RAM is 0x3FFF, and the total RAM size of this MCU is 4Kbytes, so the starting address will be 0x3000. (i.e. form 0x3000 to 0x3FFF = 4Kbytes)
Here, I am confused, why the INITRM was assigned 0x39 and why not 0x31...?? and what is the starting address of RAM if INITRM = 0x39; (Why the RAM11 bit of INITRM register has been assigned as 1).
Actually, I am pretty much confused with RAM11 bit, I referred to AN2881.pdf, it says...for example
if INITRM = 0x20; then RAM Boundary will be 0x2000 ~ 0x2FFF
if INITRM = 0x30; then RAM Boundary will be 0x3000 ~ 0x3FFF
so what will be the starting ddress format if we use RAM11 bit ...???
As I am not very experieced in this filed, all the help from you will be greatly helpful to me...
Thanks to you all in advance