Kevin Calcote

scanf sets stack pointer to non existent memory location mc9s12c32

Discussion created by Kevin Calcote on Oct 21, 2006
Latest reply on Oct 21, 2006 by Kevin Calcote
Hello,
 
    I am just writting simple programs to communicate via serial through the mcu.  printf works fine but scanf sets the stack to a bad memory location after the va_arg macro call.  Due to this when the return from my TERMIO_GetChar() function is executed it tries to read from a no existent location and jumps to 0x0 hence crashing.  I was wondering if anyone knew how to solve this problem. 
 
Thanks,
Icewater

Outcomes