public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS]  Re: Uart missing chars when in Release
Date: Mon, 28 Jan 2008 02:37:00 -0000	[thread overview]
Message-ID: <fnjf4d$icb$1@ger.gmane.org> (raw)
In-Reply-To: <OBEELMDOHGDFDEMJCJCJCEOEMIAA.laurie.gellatly@netic.com>

On 2008-01-28, Laurie Gellatly <laurie.gellatly@netic.com> wrote:
> Hi Grant,
>> >>At 117Kbps with no fifo, you have to service a receive
>> >>interrupt at a 11.7KHz or you lose bytes.  That means you've
>> >>got to have an interrupt latency less than 85us.
>> >
>> > So I modified ser_16X5X.c to read FIFO threshold (1,4,8 or 14)
>> > characters worth when an RDA interrupt occurs.
>> 
>> What was it doing?  The correct thing to do is to read all the
>> available characters each time an rx interrupt occurs.
>
> In the switch statement the (RDA)ISR_Rx case simply fell through 
> to the (CTI) ISR_RxTO case and a single character was read from RHR.

That's wrong.  It should continue to read bytes from RHR as
long as the status register says there is receive data
available.  What you describe isn't what's in my snapthost
snapshot of ser_16x5x.c.  The code I'm looking at is right: in
the Rx/RxTO case, there's a loop that reads all of the data
from the receive fifo.  My snapshot is proably a couple years
old, and it's doing the right thing.  Where did you get the
broken file?

>> If there aren't any receive overrun errors, then interrupt
>> latency isn't the problem.  There weren't any rx errors of any
>> sort (parity, framing, etc.)?
>
> Yeah, I thought this was strange as well. After I slept on it
> I found that the Rx Line Status Interrupt was not enabled.... 
> Now I see I'm getting OE.

It sounds like you've somehow gotten ahold of a broken serial
driver code.  I checked CVS, and it's got the right code in it.
I've checked all the versions back for 4 years, and they all
have a loop that will read all available rx data whenever
there's an interrupt.  Are you sure you have driver code that
only reads a single byte?

You shouldn't have had to do anything other than enble the
fifo.  The code that's in CVS is correct.

-- 
Grant




-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2008-01-28  2:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25  4:16 [ECOS] Re: Half Duplex RS485 wangcui
2008-01-26 20:41 ` Laurie Gellatly
2008-01-28 10:34   ` wangcui
2008-01-27  4:52 ` [ECOS] Uart missing chars when in Release Laurie Gellatly
2008-01-27  5:14   ` [ECOS] " Grant Edwards
2008-01-27  6:46     ` Laurie Gellatly
2008-01-27  9:54       ` Grant Edwards
2008-01-27 11:20         ` Laurie Gellatly
2008-01-27 15:55           ` Grant Edwards
2008-01-28  0:11             ` Laurie Gellatly
2008-01-28  2:37               ` Grant Edwards [this message]
2008-01-28  5:53                 ` Laurie Gellatly
2008-01-28 15:58                   ` Grant Edwards
2008-01-28 20:40                     ` Grant Edwards
2008-01-29 23:35                       ` Byron Jacquot
2008-02-06  9:35                       ` Laurie Gellatly
2008-02-06 15:25                         ` Grant Edwards

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='fnjf4d$icb$1@ger.gmane.org' \
    --to=grante@visi.com \
    --cc=ecos-discuss@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).