This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Timing differences before / after starting scheduler


On Sun, Aug 22, 2010 at 03:45:59PM +0200, Tim Jaacks wrote:
> Hello everybody,
> 
> I have a problem concering the eCos scheduler. Perhaps I just have
> not understood all the details of the eCos kernel about scheduling.
> But I have tried everything I could imagine, without success, so I
> hope someone can help me here and explain me why eCos behaves like
> it does.
> 
> I am using eCos on an LPC2378, running at 72MHz. Some driver I have
> implemented reads out eight double words from a CPU FIFO, using
> eight equal subsequent lines of C-code.
> When I make use of this driver within the cyg_user_start() function,
> these eight lines of code need 5 microseconds of time (measured with
> a logic analyzer and a toggled GPIO pin). My driver works correctly
> in this case.
> When I use the driver in a thread context, after cyg_user_start()
> has completed and the scheduler has been started, the time for these
> eight lines is more than three times longer (17 microseconds). Thus,
> the FIFO cannot be read out fast enough and an overrun occurs.

Are these times the worst case, or the normal case? Has only the worst
case changed? 

What are other threads doing? Could maybe one of the other threads set
off a DMA? DMA will compete for the memory bus with the fetch from ROM
for the executable code, reads from the FIFO and writes to RAM. Hence
everything will go slower if there is a DMA in action somewhere.

Having said this, your architecture does not sound very robust. Don't
you have any hardware flow control? Carn't you tell the sender to
pause while you catch up?

      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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]