My SP value after the call to Init() is 0x0151. My app has 2 bytes of global variables stored starting @ 0x100.
---------------------------------------------------------------------------------------------
STARTUP SECTION
---------------------------------------------------------------------------------------------
Entry point: 0xE07B (_Startup)
_startupData is allocated at 0xE084 and uses 6 Bytes
extern struct _tagStartup {
unsigned nofZeroOut 3
_Range pZeroOut 0x80 128
0x100 2
0x152 302
_Copy *toCopyDownBeg 0xE10A
} _startupData;
My prm file
SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
Z_RAM = READ_WRITE 0x0080 TO 0x00FF FILL 0x00;
RAM = READ_WRITE 0x0100 TO 0x027F FILL 0x00;
ROM = READ_ONLY 0xE000 TO 0xFFAD FILL 0x83;
/* INTVECTS = READ_ONLY 0xFFC0 TO 0xFFFF; Interrupt Vectors */
END
STACKSIZE 0x50
My app used below for loop to output the RAM value via SCI.
for(p=(uint8 *)0x0100; p<= (uint8 *)0x027f;p++)
{
SCI_Transmit(*p);
__RESET_WATCHDOG();
}
I debug my program on a demo board from freescale. And do the following operation.
1)Download the program and init() haven't executed
2)At this point, RAM from 0x0152 to 0x27F is 0x00
3)Click start button to run the program
4)PC RS232 tools received the RAM value as it should
Till now, everything is OK.
But.......
1)Pull out the power cable
2)Plug in again
3)The program run after power on reset
4)PC RS232 tools received the strange RAM value. According to the received data, RAM from 0x0152 to 0x27F is 0x80(not 0x00 which I filled) and the RAM from 0x0100 to 0x0151 is not the same result as what
I received above.
What's up? Is it feasible use my app to read the RAM value? What's your test environment?
And would you mind giving me your email and making the communication morr convienent?
Thank you for your aspiring response.