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.

TM4C1294NCPDT: Communication Error

Part Number: TM4C1294NCPDT

Tool/software:

Hi.,

I am using TM4C1294NCPDT microcontroller. I am using UART Communication for Communicating my PCB and HMI display. And the baud rate is 19200. When the communication occures(Ex: Communicating cable disconnect or PCB not sending the data to Receiver whatever cost) the HMI fault intimation receives microcontroller lately.

And the PCB and HMI UART Communication time is 5 seconds.

After 5 seconds on HMI communication fault received.If i try to reduce the communication timing (Ex:2 sec) it affecets the communication because not communicating.

Eg:Code:

if(g_UART5_TimeoutRetryCount >= 50)// adding delay
{
UART5_SuccessFlag = 0;

YELLOW_LED_Flags.Byte = IO_LED_OFF;
_RED_LED_Flags.Byte = IO_LED_OFF;
GREEN_LED_Flags.Byte = IO_LED_OFF;
SENSOR_YELLOW_LED_Flags.Byte = IO_LED_500MS_TOGGLE;
g_Data.LSU_Status_ID = sp_Status_HMICommunicationTimeout;

}

If you have any queries please let me know and explain how to solve this issue.

  • And the PCB and HMI UART Communication time is 5 seconds.

    After 5 seconds on HMI communication fault received.If i try to reduce the communication timing (Ex:2 sec) it affecets the communication because not communicating.

    Your problem description is not sufficient for me to comment.

    Explain what is the 5 seconds? Does the MCU send a data to the HMI every 5 seconds? Or does the MCU keep sending data continuously for 5 seconds?

    At 2 seconds, what do you mean there is no communication? What do you expect the MCU to respond after receiving a fault from the HMI? Show an expected response from the MCU when it is working vs when it is not working?

  • Okay Let me explain.

    MCU Sending and receiving data to HMI in every 100ms. I am using 100ms timer, 

    if(g_UART5_TimeoutRetryCount >= 50)

    This means maximum 50 attempt(ie: 50*100ms=5sec)HMI will wait for receiving the data through UART Communication. After 5 sec HMI not receiving any data controller will through Communication Error.

    If i changed if(g_UART5_TimeoutRetryCount >= 20) for ex(2sec) MCU and HMI not communicating. It need minimum 2sed delay to start the communication.

    My question is

    Is baud rate cause this issue?

    Beause i use 1,15,200 baud rate may be communicate within 500ms.

    Currently i am using 19200 Baud rate,So only communication delay will take minimum 2 seconds?

    Otherwise what is the reason behind this?Kindly help me for sort out this issue.

    Thanks in advance.

  • I'm still not clear with your problem.  

    Are you saying if you set the baudrate to 19200 then it will timeout?

    What causes the variable g_UART5_TimeoutRetryCount to increment? 

    It need minimum 2sed delay to start the communication.

    What do you mean it needs 2s to start the communication. Who controls the delay? Why is this delay needed?

    At 19200 baudrate, do you see any UART waveform on the UARTTX and UARTRX signals?

    At 115200 baudrate, do you see any UART waveform on the UARTTX and UARTRX signals?

    Again, don't expect me to understand you entire hardware and software setup as if I'm developing the application for months. It may seems obvious to you on what you are dong, but not a outsider who first time hears your description. 

     

  • I am not expecting you for understanding entire hardware and software setup. I am just asking if 19,200 this baud rates can be affects the communication delay? 

    And I don't see the waveforms for the 19200 and 115200 baud rate UARTTX signals; once I do, I'll get back to you.

  • Hi Tom,

    And I don't see the waveforms for the 19200 and 115200 baud rate UARTTX signals; once I do, I'll get back to you.

    I have not heard back from you. Hopefully you have resolved the issue on your own. I will close the thread for now. If you have any update, you can write to this post and the status will change to OPEN.