public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@ecoscentric.com>
To: grahamlab <graham.labdon@cranems.co.uk>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Simple serial comms
Date: Fri, 03 Jul 2009 09:38:00 -0000	[thread overview]
Message-ID: <m3tz1uhzta.fsf@xl5.calivar.com> (raw)
In-Reply-To: <24318020.post@talk.nabble.com>

grahamlab <graham.labdon@cranems.co.uk> writes:

> 
> I have tried flow control but to no avail
> there must be a way to receive more than 128 bytes has anybody got any other
> suggestions

Flow control should entirely solve your problem. Did you enable the
same kind of flow control at both ends of the connection?

I have run tests that successfully transfer larger quantities of data
at higher baud rates for long periods. So I don't believe there is a
significant problem with the basic driver code.

Some other things to try:

- Test against a host with a real RS232 device. USB adaptors can do
  weird things. It is worth eliminating this as a cause of problems,
  particularly with regard to flow control.

- Try increasing STM32_RXBUFSIZE in the driver source to 128 or
  more. Also add a diag_printf() to the overflow branch in the ISR to
  see if it triggers.

- Avoid diag_printf() calls while waiting for data. If you are running
  via GDB these calls can cause interrupts to be disabled while the
  output is being sent. This may cause the driver to miss characters.

- It may be instructive to work out exactly which bytes are lost in
  each message. This may give a clue as to which FIFO or buffer is
  filling up.


-- 
Nick Garnett                                       eCos Kernel Architect
eCosCentric Limited    http://www.eCosCentric.com       The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales:                         Reg No: 4422071


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

  parent reply	other threads:[~2009-07-03  9:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 12:48 grahamlab
2009-07-02 13:25 ` Simon Kallweit
2009-07-02 13:28   ` grahamlab
2009-07-02 14:24 ` Nick Garnett
2009-07-02 14:36   ` grahamlab
2009-07-02 15:36     ` Nick Garnett
2009-07-03  5:56       ` grahamlab
2009-07-03  6:18         ` Paul D. DeRocco
2009-07-03  6:46           ` grahamlab
2009-07-03  7:19             ` Paul D. DeRocco
2009-07-03  7:23               ` grahamlab
2009-07-03  7:43                 ` Paul D. DeRocco
2009-07-03  9:38         ` Nick Garnett [this message]
2009-07-03 12:30           ` grahamlab
2009-07-03 12:45             ` Nick Garnett
2009-07-03 13:36               ` grahamlab
2009-07-03 15:09                 ` Nick Garnett

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=m3tz1uhzta.fsf@xl5.calivar.com \
    --to=nickg@ecoscentric.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=graham.labdon@cranems.co.uk \
    /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).