UART Problem: Receive fails until Transmit is done

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.

Reply to
hector
Loading thread data ...

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

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           
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
Reply to
Floyd L. Davidson

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

Reply to
Iwo Mergler

It looks familiar to me too, though it would've been years ago.

Unfortunately I d> hector wrote:

Reply to
hector

Sorry for the typo, it's a 16550-compatible, not a 16450. It has a 16 byte FIFO.

Reply to
hector

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.