From: "Stuart MacDonald" <stuartm@connecttech.com>
To: slack@slackware.ru
Cc: alan@redhat.com, linux-serial@vger.kernel.org
Subject: Re: problems with serial driver
Date: Tue, 3 Sep 2002 11:29:59 -0400 [thread overview]
Message-ID: <017b01c2535e$c3befc60$294b82ce@connecttech.com> (raw)
In-Reply-To: Pine.LNX.4.44.0209031820330.24809-100000@scil.sinp.msu.ru
From: <slack@slackware.ru>
> It is clear. Not so clear, why it produces garbage when read from port, as
> if it cannot sync with line.
It can't sync with the line. Serial transmission doesn't include a
specific syncing marker.
Yes, I know about the start bit. However, when a uart starts looking
at a line that already has data on it, how does it know which one is
the start bit? It takes the first thing that looks like a start bit,
which could be a bit in the middle of a character, and thus get
mis-synced. This is the way serial transmission works.
If you try replugging the cable while the sender and receiver are
running, you will notice that occasionally you'll get lucky and get a
correct sync, but often you'll get a mis-sync and receive garbage.
> for()
> usleep();
> read();
> }
> read OK.
>
> for() {
> // usleep()
> read();
> }
> Garbage.
This shouldn't make a difference, but I suspect that the usleep() is
luckily making the timing work out so that you get a correct sync
instead of a mis-sync.
However, if you've started the sender first, in the time it takes you
to start the receiver, the uart is dropping data. Even when you don't
get garbage you should notice that you're missing the first few bytes.
..Stu
--
We make multiport serial boards.
<http://www.connecttech.com>
(800) 426-8979
next prev parent reply other threads:[~2002-09-03 15:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-02 9:55 problems with serial driver slack
2002-09-03 14:56 ` Stuart MacDonald
2002-09-03 14:30 ` slack
2002-09-03 15:29 ` Stuart MacDonald [this message]
2002-09-03 15:34 ` slack
2002-09-03 18:21 ` Stuart MacDonald
2002-09-04 5:39 ` slack
2002-09-04 12:57 ` Stuart MacDonald
2002-09-04 14:21 ` slack
2002-09-04 16:22 ` Stuart MacDonald
2002-09-03 19:17 ` David Lawyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='017b01c2535e$c3befc60$294b82ce@connecttech.com' \
--to=stuartm@connecttech.com \
--cc=alan@redhat.com \
--cc=linux-serial@vger.kernel.org \
--cc=slack@slackware.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox