[ECOS] isr() and dsr() running environment?
Jonathan Larmour
jifl@eCosCentric.com
Fri Oct 18 06:23:00 GMT 2002
Qiang Huang wrote:
> Thank you very much.
> But seems if isr() runs with global interrupt disabled when an ext IRQ is
> being processed (consider when it runs to isr() ), the reset request came
> for outside (maybe by user press the reset key or maybe by outter event
> triger a reset request) can't be responsed, but reset should be the most
> event that be responsed at anytime if it relative to some critical
> operation(eg. life saving, etc). how does this work in ecos?
As I said, some people want nested interrupts, some people don't. In this
situation you _do_ want nested interrupts. Whether nested interrupts are
supported is a property of the particular HAL in use. Not all do, not
least because some processors and/or interrupt controllers can't do it.
> BTW a general question about interrupt in microprocessor or microcontroller:
> The time when IRQ happens normally global interrupt would be disabled then
> (1). saving the reqired registers before enabled interrupt then enter
> the IRQ routine
> OR (2). run IRQ routine with global interrupt disabled
> enable interrupt after exiting from IRQ routine.
Depends whether you want nested interrupts or not! (1) means nested
interrupts are supported, and (2) means they aren't.
> -----Original Message-----
> From: Jonathan Larmour [mailto:jifl@eCosCentric.com]
> Sent: 18 October 2002 04:32
> To: jameshq@liverpool.ac.uk
> Cc: ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] isr() and dsr() running environment?
>
>
> jameshq@liverpool.ac.uk wrote:
>
>>Hi all:
>> in ecos porting guide it says the dsr() should run with interrupt
>>enabled. and according the helpful interrupt handling diagram from
>>Nick. Are the following of my assumption right?? Thanks
>>
>>1). isr() should run with global interrupt enabled and higher priority
>>interrupt than current interrupt allowed.
>
>
> Ideally yes *if* you want to use nested interrupts. Not everyone wants to,
> in which case you can leave global interrupts disabled.
>
>
>>2). dsr() should run with global interrupt enabled and all level(lower
>>and higher than current) priority interrupt source allowed.
>
>
> Yes.
>
>
>>3). means during the time processing dsr(), it can be interrupted by
>>any other interrupt souce regardless its interrupt priority?
>
>
> Yes.
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list