Hi all,
In uart receive if buffer overrun error occured means how do we handle that error? Because the buffer Overrun error bit is always set, so i can't able to proceed further receiving operation. what i have done in my progarm as follows "if buffer overrun error occurs i will be coming out from the receive operation, also i am not read the UCA0RXBUF also that tim, after that again i am trying to read through uart that time i can't able to read"
while( size > 0 )
{
if((UCA0STAT & 0x20))
{
retVal = UART_ErrorBufOverRun;
goto exit;
}
if((UCA0STAT & 0x40) )
{
retVal = UART_ErrorFraming;
goto exit;
}
if((UCA0STAT & 0x10))
{
retVal = UART_ErrorParity;
goto exit;
}
while(!(uartRegister_ptr->intrFlag & 0x01))
{
++timeOutCounter;
if( timeOutCounter >= UART_READTIMEOUTVALUE )
{
timeOutCounter = 0;
retVal = Uart_ErrorTimeOut;
goto exit;
}
}
timeOutCounter = 0;
*txrxbuf_ptr = UCA0RXBUF;
size--;
if( size > 0)
{
txrxbuf_ptr++;
}
}
exit:
return retVal;
can anyone tell me whether i am doing correctly.