AnsweredAssumed Answered

Do I have to add the delay function for receiving the USART data for safely?

Question asked by Carter Lee on Sep 18, 2017
Latest reply on Sep 20, 2017 by Clive One

Hi.

Now I'm struggling with receiving data by USART.

Currently, I have one USART receive interrupt. and once if there is interrupted by RX, then the data saved into the queue.

 

I guess but I'm not sure, but while() is too fast. So I can't get the data what I want.

for example, If PC's USART terminal  send data with 0x11 0x22 0x33 0x44.. to eval kit. then procedure with delay()  in while() is working as well.

But If I remove that delay() then, I can't get data of all (0x11~0x44).

Do I have to add the delay function for receiving the USART data for safely?

What is the fairly common way to process UART frame packet?  

 

 

One more thing.

USART3_IRQHandler just one activated never after.

 

void USART3_IRQHandler(void) //RX
{
if(USART_GetITStatus(USART3, USART_IT_RXNE) != RESET)
{
char rx = USART_ReceiveData(USART3); /*GetCharUSART1();*/
Uart3_EnQueue(rx);
USART_ClearITPendingBit(USART3, USART_IT_RXNE);
}
}

 

Did I someting miss?

Outcomes