Tool/software:
i use CCS to enable SCI,

and make a small program, try to display HEX detail with what i received by other interface ,
like UART(or SCI ?) /SPI/I2c or can
so, my variable is uint16_t.
how do i display what is receive content in hex instead of 8-bit char.
uint16_t rData = 0; uint16_t receivedChar; unsigned char *msg; rData= 31; //want to show 1F instead of 31 msg=(rData<<8); //fail msg=(rData)&0xFF; //fail SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 13);
if rdata is 49, the SCI_write will show 1
if rdata is 31, the SCI write will show nothing (because of 49 is not 8-bit character)
is there any way to show unsigned int content
just like 31=0x1F(what i want to show)
i tried include stdio.h and snprintf but failed.