UART Problem: Receive fails until Transmit is done

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm running uCLinux and have a device connected to the RX line of one
of my 16450-compatible UARTs.  When my device is initialized (through
another mechanism, not the serial port), the device sends about 16
bytes (at 9600-E-8-2) to the RX line, verified by an o'scope.

The problem I'm seeing is that a read() will not return the received
data until I transmit a byte.  I modified the serial driver to return
immediately in uart_tx_chars() to try get filling the FIFO out of the
picture.  Doing that and transmitting a byte in my application (the
byte did not transmit, as shown by the scope) allowed the read() to
work, whether the read() occurred 1 second later or 5 minutes later.

I first saw this with my app, but tip (I tap a key and the data shows
up) shows the same thing, so I don't think it's an initialization
problem.  I'm combing through the driver now, but does this condition
look familiar to anyone?  Any comments or suggestions would be
appreciated.

Thanks.


Re: UART Problem: Receive fails until Transmit is done
Quoted text here. Click to load it

It should not work like that.  I'm not sure how one would even get
it to do that...

Quoted text here. Click to load it

Something with your particular hardware????  Whatever, that is
certainly wierd!

Typically a serial port can be used in rx only (or tx only too)
mode.  The opposite functinality need not even be configured,
much less used.

--
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson
Ukpeagvik (Barrow, Alaska)                         snipped-for-privacy@barrow.com

Re: UART Problem: Receive fails until Transmit is done
Quoted text here. Click to load it

Looks like a bug I've seen before. Who made the UART?

The driver may have to do some gymnastics with the
loopback at initialisation to get around this...

Kind regards,

Iwo

Re: UART Problem: Receive fails until Transmit is done
It looks familiar to me too, though it would've been years ago.

Unfortunately I don't have the specifics on the UART, it's on-chip with
an ARM, and not one I get to talk about yet.  For what it's worth (not
a whole lot, I know), UART port 0 is being used for the console, and it
works as expected with incoming data.

Iwo Mergler wrote:
Quoted text here. Click to load it


Re: UART Problem: Receive fails until Transmit is done
Sorry for the typo, it's a 16550-compatible, not a 16450.  It has a 16
byte FIFO.


Site Timeline