When using the internal interrupt, you can register an interrupt handler at the UART component. Otherwise, you can do a busy wait by checking the size of the RX buffer.
How could I make sure that it wont read any unwanted values?
1 of 1 people found this helpful
There is an API UART_GetRxBufferSize() which returns the number of bytes in the Rx buffer (not the total size). While this returns non-zero you may read using UART_GetByte() from buffer. Mask off the status-byte with 0x00ff and convert to an uint8.
Ok Bob.Thank you.