Skip to main content
This topic has been closed for replies.

2 replies

paolo239955_stm1
Associate II
May 17, 2011 9:32 AM UTC
Posted on May 17, 2011 at 11:32

sorry, wrong forum....I'll repost on ARM9 STR9 forum

paolo239955_stm1
Associate II
May 17, 2011 9:32 AM UTC
Posted on May 17, 2011 at 11:32

Hi all,

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:

char outval[16];

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 ?

I am desperate , please help !