• TI Thinks Resolved

RTOS: Printf of hexdecimal not works

Guru 18220 points

Replies: 11

Views: 138

Tool/software: TI-RTOS

Hi, I'm working with the serial and I'm having trouble printing a hexadecimal value in uppercase. In lower case it works very well, in fact, I have:

System_sprintf(value, "%02x %02x %02x %02x\n ", Myvar[0], Myvar[1], Myvar[2], Myvar[3]);
	    UART_write(uart, value, 29);

And I see: 5e 5e 5e 5e

If I use:

System_sprintf(value, "%02X %02X %02X %02X\n ", Myvar[0], Myvar[1], Myvar[2], Myvar[3]);
	    UART_write(uart, value, 29);

I see: X X X X 

Why?