[ECOS] Re: Uart missing chars when in Release
Sun Jan 27 05:14:00 GMT 2008
On 2008-01-27, Laurie Gellatly <firstname.lastname@example.org> wrote:
> I have an LPC2112 UART0 running at 117K (2112 does not have
> the fractional divider, 2112/01 does).
> I'm sending it 100 characters (1 to 100) at that baud and
> printing out the characters after they have all arrived.
Arrived where? Sending from where?
Is eCos running on both the sending and receiving device? Are
the "missing" caracters actually on the wire or not? (That
would tell you whether it's the sender's fault or the
> I get consistently 100 chars arriving when the app is run in
> RAM under debug in eclipse. When running the Release code from
> flash, about 30% of the time I get less than 100. By less I
> mean up to 14 characters less. The missing characters are
> typically together in 1 or 2 bursts.
> I can't spot what is making the difference.
I'm not familiar with your platform, but on many platforms
running from flash can be much, much slower than running from
RAM -- in some cases up to maybe 8-10X slower, but 4X slower is
more typical. Flash often has much slower access times that
RAM and is often narrower than RAM. 2X bus cycles with 4X
access time can add up pretty fast.
> I've checked the ecc files and made then as close as possible.
> I have noticed, that for some strange reason, telling eCos to
> disable the FIFO seems to help though its does not seem to set
> it up or make use of it.
> Any suggestions on what to try next?
Are you seeing rx overrun errors? If the rx end is running too
slowly for the data rate, you would see rx overrun errors.
Grant Edwards grante Yow! What UNIVERSE is
at this, please??
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss