S32K144 sprintf doesn't work for floating point formatter(%f)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144 sprintf doesn't work for floating point formatter(%f)

1,171件の閲覧回数
taehyunyoon
Contributor I

I am developing an MCU application using S32K144EVB-Q100 EVB and using S32DS_ARM_Win32_v2.0 as IDE.

However, I have a trouble in printing out floating point using %f format.

Especially, I got in trouble of using sprintf.

If I run below code,

char buffer[512];

float testValue = 3.0;

sprintf(buffer, "test:%f\r\n", testValue);

// writeout the buffer to uart console.

"test:" was only printed out to the uart console.

In debbugging mode, I could also see there are no characters of testValue(floating value) variable in buffer array.

0 件の賞賛
返信
0 返答(返信)