public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Paul D. DeRocco" <pderocco@ix.netcom.com>
To: "eCos Discuss" <ecos-discuss@ecos.sourceware.org>
Subject: RE: [ECOS] Simple serial comms
Date: Fri, 03 Jul 2009 07:19:00 -0000	[thread overview]
Message-ID: <PGEAIGBPLOMOJDAPCOJHIEDONEAB.pderocco@ix.netcom.com> (raw)
In-Reply-To: <24318425.post@talk.nabble.com>

> From: grahamlab
>
> I mean that if I send more that 128 bytes some go missing.
> If I set the read to block and then send my bytes the ecos program blocks
> until several messages of 128 bytes have been receeived before unblocking
> and when it unblocks the message received is corrupted

It looks to me like this serial driver uses an interrupt per byte. My guess
is one of the following is wrong: 1) you've selected a very high bit rate;
2) you've misconfigured eCos, and the CPU is running at a slow clock rate,
or 3) there is some other source of interrupts erroneously keeping the CPU
busy.

If the answer is 1, and you really need to speed things up, this driver
could be rewritten to use DMA. I would recommend using DMA into a buffer
large enough to capture, say, 15ms worth of data, and then using the 10ms
timer interrupt to transfer data from the DMA buffer to the user buffer. But
that would be a complete rewrite. You'd learn quite a bit about the eCos
interrupt and device driver structure, but it's nontrivial.

--

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com


-- 
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:[~2009-07-03  7:19 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 [this message]
2009-07-03  7:23               ` grahamlab
2009-07-03  7:43                 ` Paul D. DeRocco
2009-07-03  9:38         ` Nick Garnett
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=PGEAIGBPLOMOJDAPCOJHIEDONEAB.pderocco@ix.netcom.com \
    --to=pderocco@ix.netcom.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /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).