Announcements

Ever wondered how you could shape the future in collaboration with others? Join us at OktoberTech Asia Pacific and get inspired. Click here to sign up FREE of charge.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

Not applicable
Hello,

I work with Dave 4 and try to detect that the UART receive one byte. I switched the RX-FIFO off. I got the byte read only when a second byte has been received.
It's always a delay of one received byte.

My code is:

if (XMC_USIC_CH_GetReceiveBufferStatus(XMC_UART1_CH1) > 0)
{
UART_Receive(&UART_0, (uint8_t *) & read_data, 1);

How to code that if one byte arrived that I could read it immediatly? Maybe based on an interrupt? I need to avoid to poll again and again.

Kind regards
Kurt
1 Reply
Not applicable
Solved.

I had to code

if (XMC_USIC_CH_GetReceiveBufferStatus(XMC_UART1_CH1) > 0)
{
read_data=(uint8_t)XMC_UART_CH_GetReceivedData(XMC_UART1_CH1);

It's working now.
0 Likes