Re: [UART] 8250:RTS/CTS flow control issue.

From: Russell King
Date: Thu Mar 17 2005 - 05:00:08 EST


On Tue, Mar 15, 2005 at 05:05:54PM +0100, moreau francis wrote:
> Does it mean that we can't do any reliable flow
> controls with 8250 UART ? In that case a simple
> workaround would be to limit tx fifo to 1 byte...

With a popular 8250 UART on the other end, you need to ensure that
you disable the CTS signal with sufficient time (== at least the
number of bytes in the transmit FIFO) so that the transmission stops.

This is because many 8250 UARTs don't have any hardware linkage
between the CTS signal and the transmitter. Later 8250 UARTs which
do have automatic hardware flow control allow for this, as do
most other serial peripherals.

I, therefore, strongly suggest that you arrange to do the same -
iow, deassert RTS when your buffer is approaching approx. 2/3 full
rather than absolutely full.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/