AnsweredAssumed Answered

flush usart receive buffer

Question asked by carter.bob on Nov 14, 2014
Latest reply on Nov 14, 2014 by carter.bob

I need a way to flush the usart2 receive buffer . Will the following line do the trick or is it necessary to do something with the received rubbish bytes?

// If buffer contains garbage, do nothing
while (USART_GetFlagStatus(USART2, USART_FLAG_RXNE) == SET);

Kind Regards