Hi Group
2-3 weeks ago I initiated a thread (Raw speed) because I have a
problem loosing bytes in my device (not a PC connected modem)
I've now realised that this is caused by a data rate a little higher
than 960 bytes/sec on a 9600 baud connection, no error correction, no
compression.
I'm using a Conexant CX06827 chip in parallel FIFO mode, i.e. using
the build in 16550A device.
My transmit interrupt basically look like this:
If TX fifo is not empty drop out
If CTS not high drop out
while I have data to send and I haven't yet send 16 (FIFO size)
{
set debug port A
send next byte
if CTS low set debug port B and drop out
clear debug port A
}
clear debug port A
clear debug port B
When I force a rate just above 960 bytes/second I do after a while
experience a low CTS. Tests has shown that sending 970 bytes/sec gives
CTS low after 30 second. After another 15 seconds I loos characters.
Looking at my port debug with a scope shows this
A ______|---|---|---|__________|---|---|_____|---|_______
B ____________________________________|-|_______|-|______
T1 T2
First situations show 3 bytes send to TX
Next shows two bytes but after having send number 2 CTS goes low
Last situation show that one byte is sent and then CTS goes low.
Please notice that before entering my while loop I also check CTS and
only transmit any bytes if it is actually high.
So according to the scope views I'm doing what I'm supposed to do -
but when we look at the timing it typically show just about ½ms
between T1 and T2. I.e. the time from modem clears CTS to it has
become high again. Knowing that a 9600 baud connection requires just
above 1ms per character it is strange that it changes CTS so fast. In
fact I would expect it to keep CTS low until an internal buffer has
again dropped down under a certain level.
Does any of you know about this conexant device or 16550A in general.
Do I somehow interpret the status bits wrong?
/Kim Bøndergaard