This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352P: System_sprintf issue using float format

Part Number: CC1352P

I am using the TI-SDK  sdk_4_30_00_54 release on CC1352p custom board.

I need to convert float into string.

Created the test code as below:


char val[40];
System_sprintf(val,"%.2f",4.19);
printf("Battery level = %s\n",val);

Printed console:

[Cortex_M4_0] Battery level = f

Tried suggested solution on similar issues, Still no solution.

1. " https://e2e.ti.com/support/tools/ccs/f/81/t/901286?CCS-66AK2G12-Printing-Floating-point-numbers-using-UART-printf-"

2. "https://e2e.ti.com/support/legacy_forums/embedded/tirtos/f/355/t/584719?RTOS-CC2640-sprintf-issue-using-float-format" 

Any idea how to convert float into string?