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.

Starterware/TM4C1230H6PM: Uart Tx buffer change value

Part Number: TM4C1230H6PM

Tool/software: Starterware

hello , i am working with the uart , and its work fine , but i'm a try transmit a sense of data the size 20 bits , but the Uart only trasmit the firts 16 bits , i used the next funcion , which is the error ??

void SendData(char *ptr){

ROM_UARTCharPutNonBlocking(UART0_BASE, 0xFF);

while(*ptr){ 
ROM_UARTCharPutNonBlocking(UART0_BASE,(unsigned char)*ptr); 

ptr = ptr + 1; 

}

ROM_UARTCharPutNonBlocking(UART0_BASE, 0xFB);

sum=(~sum+1)&0x0f; 
sum+=0xE0;

ROM_UARTCharPut(UART0_BASE,sum);

ROM_UARTCharPut(UART0_BASE, 0xF0);

}

 

 

  • Hello Andres

    Where is the variable "sum" being allocated a value and what type of variable "sum" is?
  • hello Amit , thanks for your reaply ,

    the varible sum is a check sum for the protocol than i am worked ,and there take any value , the proble consist in the size of the buffer Tx , there not trasmited all the values , when the size of the vector its greater of 16 bits there not trasmited the last values .

    the protocol always start with 0xFF and the last data 0xFB , cheksum in hex and 0xF0 , like in the next image .

    but when i am work with extend protocol never trasmit the last data,like in the next image , the 0x19 is other data in transmission and not is data in protocol fail the checksum , and the 0xF0.

    which can are the problem ???? 

  • Hello Andres,

    Can you please scope the TX of the UART and see which characters are transmitted and which are not? I see that you are using Blocking and Non-blocking methods for UART. I would suggest using the blocking method "UARTCharPut" for transmit operations.