Hi,
i have a problem with using sscanf. I want to convert a hexdezimal ASCII Code to an integer. If i use it in main(), everything works, but if i put in in an event like AS1_OnRxChar() it does not work. Sometimes there are the wrong results, somtimes the program "hangs".
My code is like:
void AS2_OnRxChar(void)
{
...
char in[] = "CD";
int i;
...
sscanf(in, "%x", &i);
...
}
The variable i should be 205, but it does not work!!!
Can sombody help me? What is my mistake?
Best Regards
freddyka
Sounds like a stack overflow. Increase the STACK_SIZE in the prm file.
Hi,
if i change the Stack-size sometime it runs better, sometimes not. It seems, that is the problem. But what size is necessary for the Stack? Where can i see the used RAM? My microcontroller is the MC9S08DZ60.
Thank you for an answer,
freddyka