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; }