Not applicable
Oct 06, 2015
03:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 06, 2015
03:50 AM
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
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
Oct 06, 2015
03:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 06, 2015
03:57 AM
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.
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.