This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Problems with cyg_io_read
- From: Amanda Heyward <amanda_heyward at yahoo dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Cc: Andrew Lunn <andrew at lunn dot ch>
- Date: Thu, 19 Aug 2004 10:25:16 -0700 (PDT)
- Subject: Re: [ECOS] Problems with cyg_io_read
Thanks Andrew. I'm looking at my graphical config tool
and I don't see any option for the full driver. AI had
enabled the hal/diag driver under TTY Mode Serial
Device Drivers, but disabling it doesn't seem to make
any difference though. Other than this I have enabled
the Hardware Serial Drivers for /dev/ser1.
I also looked in the Build->packages tree, but
couldn't locate any full driver.
Can you please help me.
Thanks.
Amanda.
--- Andrew Lunn <andrew@lunn.ch> wrote:
> On Thu, Aug 19, 2004 at 08:51:29AM -0700, Amanda
> Heyward wrote:
> > Hi,
> > I have written a small application for the
> EB40A
> > board. It uses cyg_io_read to read bytes sent from
> a
> > PC. Since I don't know how many bytes the PC would
> be
> > sending, I would read the first byte (which is the
> > length field), and read the rest accordingly.
> > The problem is that if the number of bytes sent
> are
> > more than 15, then the second read function fails
> to
> > read everything. It reads a few and skips to the
> last
> > byte. the number of bytes that are read are lower
> than
> > what I have specified. I'm also using the read
> > functions in blocking mode.
> > Also, in general, if I try to read one byte at a
> time
> > in a for loop, then again read fails for
> transmissions
> > greater than 15. But if I do one single read on
> > whatever number of bytes, then its ok.
>
> What serial driver are you using, the dumb haldiag
> or the smart full
> driver?
>
> How do you have flow control setup? My guessing the
> EB40a has a 15
> byte fifo on the receive port and you are
> overflowing it when using
> the haldiag driver. The full driver will do
> interrupt driver transfers
> into its own buffer which will probably solve this
> problem.
>
> Andrew
>
> --
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss