Thread (11 messages) 11 messages, 3 authors, 2002-09-04

Re: problems with serial driver

From: <hidden>
Date: 2002-09-03 14:30:50


On Tue, 3 Sep 2002, Stuart MacDonald wrote:
From: <redacted>
quoted
1. Starting receiver, sender: all is OK.
2. Starting sender, receiver: sometimes OK, sometimes I've got damaged
data. Sometimes - IRQ overruns (losting NULL pointer etc). Kernel down.
I'm not convinced this is a problem. The sender starts sending data
right away, correct? Well, that data is discarded by the receiver port
since it's not open for reading. The port knows it's not opened, and
thus nobody is interested in the data coming in, so it drops it. This
is correct behaviour.
It is clear. Not so clear, why it produces garbage when read from port, as
if it cannot sync with line.
quoted
Progs are very simple: send/receive (like in HOWTO). So,
operations are intensive. Installation of some
usleeps before read() from port solves the problem.
Kernels are up to 2.4.18 and on modern up to 2.5.17.
Installation of usleep()s where? In the user space application? That
shouldn't make a difference. Actually it should make it worse.
in the simple prog, that is doing read() from the port (intensive read).

for()
usleep();
read();
}
read OK.

for() {
// usleep()
read();
}
Garbage.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help