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.

TM4C123GH6PM: sprintf function on TM4C

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: LM34

Hello all,

I am trying to run a program for a temperature sensor that gets the value from a LM34 on PE3. The program that I have uses sprintf and for some reason it gets "stuck" on that command.

Is there a reason why that happens? Or is it possible for the TM4C to run that code? The partial code of what I am using is below.

#include <stdio.h>

void UART0_puts(char* s);

...

void main()

{

int temperature;

char buffer[16];

...

...

while(1)

{

temperature = ADC0_SSFIFO3_R * 330 / 4096;

...

sprintf(buffer, "\r\nTemp = %dF", temperature);

UART0_puts(buffer);

delayMs(500);

}

...

...