先贴上一段程序,请高手看看,进入子程序分配地址映射后,执行完最后一条语句后,没法返回主程序,这倒底是怎么回事?我用的片子是MC9S12DP512。
void AddressSet_Init(void)
{
//MEMSIZ0 = 0X26; //Allocated System Register Space
//1 = Allocated system register space size is 2K byte
//0 = Allocated system register space size is 1K byte
INITRG = 0x00; //Special Register Base Address is set 0x0000,1K(0x0000--0x03FF)
INITRM = 0x00; //RAM Base Address is set 0x0000,上上对齐,14K,(0x0000--0x3800,0x000-0400 is invisible)
INITEE = 0x31; //EEPROM Base Address is set 0x3000,4K,(0x3000--0x3FFF 0x3000-0x3800 is invisible)
MISC = 0x0F; //Flash Rom Use the Second half space address
PPAGE = 0x28; //Page is set 40
}作者: strongchen 时间: 2010-4-26 09:37