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]

FW: Is eCos running any background process?


> From: pderocco@ix.netcom.com
> To: oricon776@hotmail.com; ecos-discuss@ecos.sourceware.org
> Date: Thu, 9 Oct 2008 00:05:32 -0700
> Subject: RE: [ECOS] Is eCos running any background process?
>
>> From: Yong Chen Tan
>>
>> Hi, currently I am using polling to capture all my 2238 items
>> because the interrupt is not fast enough. For my application, my
>> DSYNC pulse is at 4.72us. That means I need to read on every
>> 4.72us. My total time required to finish capture 2238 data is
>> calculated to be 10.6ms. Based on your analysis saying that eCos
>> will actually receive interrupts from system clock every 10ms. Is
>> there a way to prevent eCos from doing anything during the
>> 10.6ms? Because data is coming in at every 4.72us, so everytime
>> when I execute this function, there is bound to be 4 DSYNC values
>> not caputred.
>
> What's probably causing your data loss is the timer DSR. Every 10ms
> (typically) the timer generates an IRQ, and the ISR code schedules the timer
> DSR code. The ISR probably runs in well under 4.72us, but the DSR takes much
> longer. Since all DSRs have higher priority than all threads, this causes
> your data loss.
>
> However all ISRs have a higher priority than all DSRs, too. So if you have
> some way of hooking up your DSYNC to an external IRQ line, you can write an
> ISR that does nothing but write one byte into the buffer. This should be
> able to keep up with the data rate just fine, assuming you're running the
> ARM at a typical 166-200MHz speed.
>
> If you don't have a way to get DSYNC to generate an interrupt, then you've
> got a hardware design that isn't going to give you a clean way to accomplish
> this, and you'll have to resort to some nasty hack like shutting off
> interrupts entirely while you fill the buffer, and possibly suffering a lost
> timer interrupt.
>
> --
>
> 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
>

Hi, thanks for your valuable advice you have given.

Is it possible to shut off interrupts entirely?
_________________________________________________________________
Join the Fantasy Football club and win cash prizes here!
http://fantasyfootball.sg.msn.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


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