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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

389 Views
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 Kudos
0 Replies