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: isr() and dsr() running environment?


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?

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.

in the above two situation global interrupt is disabled for a certain time
period, if the "reset" (or maybe any other very crtical operation needed eg.
life saving etc) IRQ comes in during the time global interrupt is disabled
so "reset" IRQ would not be responsed, so how can this be solved out or
avoided? Does that mean we better to run isr() with global interrupt(just
for higher priority interrupt) enabled and dsr() runs with all interrupt
enabled(regardless of interrupt priority)?

Thanks

-----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.

> BTW seems sparc works in that way, right?

Should do. If not, it's a bug.

Jifl
--
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


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