This is the mail archive of the ecos-discuss@sources.redhat.com 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: masked interrupt source and DSR


On Mon, 2003-09-08 at 05:57, Backhaus Willy wrote:
> hello,
> 
> we use ARM7 based controller.
> in the "Embedded software development with ecos" (page 41 and code listing
> 3.2) is mentioned that when using DSRs the corresponding interrupt source
> should be masked at the beginning ISR and should be unmasked only at the end
> of the DSR execution.
> I would unmask the interrupt source at the end of ISR and post the DSR every
> time de interrupt occurs, even if the DSR isn't executed yet. the DSR
> prototype has a parameter "count" wich gives the number of times the ISR has
> requested that this DSR be scheduled..
> 
> what happens if I enable the interrupt source at the end of the ISR? any
> side effects?

This can only work if your ISR performs sufficient operations on the 
device to service the immediate interrupt condition, otherwise, you'll
be in an infinite loop and never get to run your DSR or any other code.

Note: we don't recommend such a structure, as it typically requires too
much to happen in the ISR.  The ISR should be small & fast - just enough
code to figure out what the interrupt condition is and dispatch the DSR
to actually take care of it.  This way, we can dispatch interrupts 
efficiently with only very short periods where interrupts are disabled.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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