Other Parts Discussed in Thread: CC430F6137
I'm facing a difficulty. I wrote a code that copy bytes from msp430 flash to a spi external memory. I create a logging file during the debug session in order to monitor what does happen. At the beginning there was no problem, but when I add the logging file, I've got this error after few minutes of execution:
Thu May 27 16:54:31 2010: Fatal error: Failed to identify device Session aborted!
Thu May 27 16:54:31 2010: Unable to execute: driver busy.
Thu May 27 16:54:31 2010: The stack 'Stack' is filled to 100% (120 bytes used out of 120). The warning threshold is set to 90.%
Here is a part of my code:
ecriture_octet(*p,k);
data_mem = lecture_octet(k);
logout_octet(k, *p);
void logout_octet(char serie, char test)
{
char tempo=0;
char to_print[21] = "000:IN:00/OUT:00/KO";
to_print[19]='\n';
to_print[0] = HEX_TO_ASCII((char)serie>>8);
to_print[1] = HEX_TO_ASCII((char)serie>>4);
to_print[2] = HEX_TO_ASCII((char)serie);
to_print[7] = HEX_TO_ASCII(test>>4);
to_print[8] = HEX_TO_ASCII(test);
to_print[14] = HEX_TO_ASCII(data_mem>>4);
to_print[15] = HEX_TO_ASCII(data_mem);
if(test == data_mem)
{
to_print[17]='O';
to_print[18]='K';
}
for(tempo=0;tempo<20;tempo++)
{
putchar(to_print[tempo]);
}
}
The error come when I use the putchar function. I don't understand why does putchar overflows my stack.
Did someone face the same problem? or get another solution to generate a logging file without overflowing the stack?
Thanks,
Guillaume