I am using TX and RX interrupt routine for uart. The board is receiving less than 30 characters from an external device. When it receives 15 or 16 it just receives the last char multiple times(more than 200 times). I am using a serial analyzer to check what exactly the Tx is transmitting. It just transmits 30 characters something. The Rx receives the data fine until 15th and 16th character then it starts receiving the last character multiple times
the following is my Rx routine,
void DEMO_USART_IRQHandler(void)
{
uint8_t data = 0;
/* If new data arrived. */
if ((kUSART_RxFifoNotEmptyFlag | kUSART_RxError) & USART_GetStatusFlags(DEMO_USART))
{
data = USART_ReadByte(DEMO_USART);
if( ( bIgnoreFirstZero == CLEAR ) && ( data ) )
{
bIgnoreFirstZero = SET;
}
if(bIgnoreFirstZero == SET)
{
if( ( data == CARRIAGE_RETURN ) )
{
bTportUartDataRec = SET;
}
else if( data == END_OF_TEXT )
{
bTportUartDataRec = SET;
}
else
{
*(gUARTReciveStr+gStrOffset)= data;
gStrOffset++;
}
}
}
SDK_ISR_EXIT_BARRIER;
}
Not sure if I am checking the correct flags?
The following is the configuration.
Hello @NVazquez ,
How about first use UART example under SDK ?
If still have issue, please tell me chip part number , and the steps how to reproduce your issue on my side, thanks!
BR
Alice