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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,702 次查看
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 回复数