Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TMS570LC4357: SCI(UART) Loop Back issue

Part Number: TMS570LC4357

Tool/software:

Hi Ti Team, 

I am working on SCI(UART) in TMS570LC4357, and trying to perform Loop Back Test. 
Loop Back Test is successful when I execute my code step by step and it's getting failed in the free run. 

will be attaching the loop back test code which I'm currently using, Kindly look into it and help us asap. 

Thanks and Regards, 
Naveen 

T_BOOL Uart1LoopBackTest()
{
    T_UINT8 transmit_value = 0;
    T_UINT8 receive_value = 0;
    T_UINT16 index = 0;
    T_BOOL return_status = 0;

    sciInit();

    sciEnableLoopback(sciREG1, Digital_Lbk);

    transmit_value = 0xAA;
    sciSend(sciREG1, sizeof(transmit_value), &transmit_value);

    index = M_CLEAR;
    while(1)
    {
        if(M_ZERO M_NOT_EQU sciIsRxReady(sciREG1))
        {
            sciReceive(sciREG1, sizeof(receive_value), &receive_value);
            break;
        }
        else if (M_THOUSAND M_EQUAL index)
        {
            break;
        }
        index = index + M_ONE;
    }

    if(transmit_value M_EQUAL receive_value)
    {
        return_status = TRUE;
    }
    else
    {
        return_status = FALSE;
    }

    sciDisableLoopback(sciREG1);
    return return_status;
}