Other Parts Discussed in Thread: MSP430F5528
Hi,
I have a serious problem compiling and flashing code for MSP430F5528 using CCS 5.4.0.00091
The following code compiles well, but after flashing into target doesn't go to main()
int main(void)
{
unsigned char c;
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
init_hardware();/ low level hardware initialization
AFE_setup();
init_vars();// system variables initialization
SF_init();// initialize Serial Flash
SF_readID();
SF_view(0);
......
After pressing the suspend button I see the following picture:
After commenting out the last line (// SF_view(0);) everything works fine.
Am I too tired, or...?
The offending function is:
/**********************************************************/
/* Name : SF_view */
/* Parameters : start address */
/* Returns : none */
/* Function : to check integrity of calibration file */
/* */
/**********************************************************/
void
SF_view(unsigned long startaddr)
{
unsigned char c, col;
unsigned int i, j;
unsigned long addr;
addr = startaddr;
col = 0;
putstring_PC((
unsigned char*)"\r\n");
do
{
SF_read(addr, fbuffer, 256);
for(i = 0; i < 256; i++)
{
if(col ==0)
{
hexout_PC_long(addr);
putchar_PC(
' ');
}
if(isprint(fbuffer[i]))
{
putchar_PC(fbuffer[i]);
putchar_PC(
' ');
}
else
hexout_PC(fbuffer[i]);
putchar_PC(
' ');
col++;
if(col == 16)
{
for(j = 0; j < 16; j++)
{
//putchar_PC(fbuffer[i-15+j]);
if(isprint(fbuffer[i-15+j]))
putchar_PC(fbuffer[i-15+j]);
else
putchar_PC(
'.');
}
col = 0;
addr += 16;
putstring_PC((
unsigned char*)"\r\n");
}
}
while(ischar_PC()==0){}
c = getchar_PC();
}
while(c != 0x1b);
}
/*--------------------------------------------------------*/
/* End of Function: SF_view */
/**********************************************************/
Help will be much appreciated.
Regards
Jan
