panpwr

UART RX stream stops when receiving special characters

Discussion created by panpwr on Jan 8, 2013
Latest reply on Jan 13, 2013 by panpwr

Hello,

 

I am using an interrupt-driven UART port with MQX 4.0.

Here are the strings I see using an external terminal console (the expected result):

Terminal:

at+iRP1

ID809b16 11.6.2012

I/OK

 

And here is what i get from UART:

at+iRP1\r\n

ID809b16 11.6.2012\r\n

I      <=== Missing chars: "/OK"

 

The second batch actually comes through fine, even with the special char "/":

Terminal = UART:

at+iRP1

I/OK

 

However, the 3rd batch stops at a special character as well:

Terminal:

at+iRP3

0801 9.6.2009

I/OK


UART:

at+iRP3

0801 9   <=== Missing chars: ".6.2009"

             <=== Missing chars: "I/OK"


This is my receptions code:

 

if (_io_fstatus(ch))

{

   //Pending char in UART

   rx_uart = fgetc(connect_one_ch);

}

 

I've opened the UART descriptor using io_open, with no flags. What am I missing here? Please notice that the problem persists when I try to receive 3 lines from UART. Is there a special property I need to set?

 

Thanks,
Lior.

Outcomes