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.

sprintf() problems

Other Parts Discussed in Thread: EK-TM4C1294XL

Hello

I'm working with tm4c1294gxl

To check the functionality of sprintf() I have just copied the folder "Hello" from example code. & added all necessary files to run the code. & the code worked properly.

then I added and added following lines in the code at 1. original example code at the location "TI\examples\boards\ek-tm4c1294xl" as well as 2. in my new code location.

//------------------------------------------------------------------------------------------
char str[10] ;
float a = -3.24;
sprintf(str, "%f", a);
UARTprintf("string = %f",str);
//------------------------------------------------------------------------------------------

case 1 worked fine.

In case code  gets hanged at " sprintf(str, "%f", a); " & if I comment " sprintf(str, "%f", a); " then I can see "string = ERROR " on serial monitor. Please let me know where I'm getting wrong.

attaching the code file here.  the added code lines can be found from line no :134 to 139. remaining code is similar to "Hello" code from TI\examples\boards\ek-tm4c1294xl0181.hello.zip