[parent not found: <1CRun-1dV-41@gated-at.bofh.it>]
[parent not found: <703905114@toto.iv>]
* Re: synchronous serial port communication (16550A)
[not found] <703905114@toto.iv>
@ 2004-03-24 0:46 ` Peter Chubb
0 siblings, 0 replies; 6+ messages in thread
From: Peter Chubb @ 2004-03-24 0:46 UTC (permalink / raw)
To: Christof; +Cc: linux-kernel
>>>>> "Christof" == Christof <mail@pop2wap.net> writes:
Christof> Miquel van Smoorenburg wrote:
>> Why don't you simply turn on hardware flow control (i.e. enable
>> CRTSCTS with tcsetattr() or even stty) ?
>>
>> Mike.
Christof> RTS has a special meaning with this lcd-controller, so I
Christof> don't want that it is set without my implicit will. - To
Then wire it to something other than CTS at the host
end.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
The technical we do immediately, the political takes *forever*
^ permalink raw reply [flat|nested] 6+ messages in thread
* synchronous serial port communication (16550A)
@ 2004-03-23 10:09 Christof
2004-03-23 10:31 ` Russell King
2004-03-23 10:49 ` Miquel van Smoorenburg
0 siblings, 2 replies; 6+ messages in thread
From: Christof @ 2004-03-23 10:09 UTC (permalink / raw)
To: linux-kernel
Hello,
I have a possible problem with the 8250 serial port driver in linux (2.6.2).
I communicate with a graphic controller with LCD-Display via ttyS0. This
controller has a small buffer: 20 bytes. When the buffer is full it
asserts the CTS line. When it can receive data again, the CTS line is
cleared.
My software checks the CTS line each time before sending a byte. If it
is asserted, it waits until its cleared and goes on. When data is sent
although CTS is asserted, the graphic controller will be confused and
garbage will appear on the LCD screen.
To make the story short: I see a lot of garbage on the LCD.
It looks like output would be buffered and all data would be sent at
once without giving me the possibility to check if everything's
allright. Sometimes I can send >400 Bytes and ioctl says that CTS is not
asserted, altough it certainly is. What I need is totally synchronous
I/O. I want all bytes to be sent physically before I check for CTS, but
I can't find a possibility to actually achieve this. I tried to hack the
driver not to use the FIFO (My Linux box has a 16550A UART) and to set
the size of the circ buffer to 1, but nothing helped.
I compiled my software for cygwin for my Windows-machine and it worked,
the only thing is that I don't know what UART is build in, but i suppose
that it also has a FIFO since it is a quite new machine. (The FIFO is
also enabled in windows too).
Do you have any idea what I could do?
Thanks in advance and sorry for the messy english =)
Regards,
Christof Krueger
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: synchronous serial port communication (16550A)
2004-03-23 10:09 Christof
@ 2004-03-23 10:31 ` Russell King
2004-03-23 10:49 ` Miquel van Smoorenburg
1 sibling, 0 replies; 6+ messages in thread
From: Russell King @ 2004-03-23 10:31 UTC (permalink / raw)
To: Christof; +Cc: linux-kernel
On Tue, Mar 23, 2004 at 11:09:33AM +0100, Christof wrote:
> To make the story short: I see a lot of garbage on the LCD.
> It looks like output would be buffered and all data would be sent at
> once without giving me the possibility to check if everything's
> allright. Sometimes I can send >400 Bytes and ioctl says that CTS is not
> asserted, altough it certainly is.
It probably isn't, at the time you check it. When you write a byte,
the call will generally return immediately because it'll be placed in
a buffer. Transmission has only just started, and you then go and check
the CTS line. Repeat multiple times on a slow enough baud rate, and
you'll end up queueing a lot of bytes.
You could write a byte, wait for it to complete by calling ioctl(TCSETSW)
without changing any parameters, and then read the CTS status.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: synchronous serial port communication (16550A)
2004-03-23 10:09 Christof
2004-03-23 10:31 ` Russell King
@ 2004-03-23 10:49 ` Miquel van Smoorenburg
1 sibling, 0 replies; 6+ messages in thread
From: Miquel van Smoorenburg @ 2004-03-23 10:49 UTC (permalink / raw)
To: linux-kernel
In article <40600CDD.5050807@pop2wap.net>,
Christof <mail@pop2wap.net> wrote:
>I have a possible problem with the 8250 serial port driver in linux (2.6.2).
>I communicate with a graphic controller with LCD-Display via ttyS0. This
>controller has a small buffer: 20 bytes. When the buffer is full it
>asserts the CTS line. When it can receive data again, the CTS line is
>cleared.
>My software checks the CTS line each time before sending a byte. If it
>is asserted, it waits until its cleared and goes on. When data is sent
>although CTS is asserted, the graphic controller will be confused and
>garbage will appear on the LCD screen.
Why don't you simply turn on hardware flow control (i.e. enable
CRTSCTS with tcsetattr() or even stty) ?
Mike.
--
Netu, v qba'g yvxr gur cynvagrkg :)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-03-24 0:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1CRaT-Zx-3@gated-at.bofh.it>
[not found] ` <1CRO7-1s4-19@gated-at.bofh.it>
2004-03-23 11:31 ` synchronous serial port communication (16550A) Christof
[not found] ` <1CRun-1dV-41@gated-at.bofh.it>
2004-03-23 11:33 ` Christof
[not found] <703905114@toto.iv>
2004-03-24 0:46 ` Peter Chubb
2004-03-23 10:09 Christof
2004-03-23 10:31 ` Russell King
2004-03-23 10:49 ` Miquel van Smoorenburg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox