On 09-04-2009 at 15:52, Anonymous wrote:
I am in big trouble with my app, EWARM 5.20 + uC/OS II. I have a task writing a floating on an output buffer, like this:
float me->INval__ = 123.456;
sprintf (outval, "%f", me->INval__);
well, sprintf writes randomly "0.000" or "-nan" (or other garbage) to outval buffer.
I stepped thru all the (s)printf assembler to check the stack pointer, it stays inside his bounds. I tried changing from ARM mode to THUMB mode, no relief. The strangest thing of all, if I put a simple sprintf loop in main task without creating any other task sprintf woks well. Something to do with task switching ?
Retrieving data ...