UART Buffer Clearing | Cypress Semiconductor
UART Buffer Clearing
I'm having a slight problem with the UART. Using the recommended method of a while loop UART_GetBufferSize() then doing UART_GetChar(), I get the received data and act on it. My code uses the CR-LF to indicate that a command has been received. The very next time I check back, there is still a CR-LF (or another one) as seen by the UART_GetBufferSize(). I do not see a CR-LF coming in with a scope on the receive line and have to believe it is a buffer issue. The work around is to UART_Stop and UART_Start. Any suggestions?