public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Helgason <danielh@telus.net>
To: Mike Sweeney <msweeney77@gmail.com>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] HAL_INTERRUPT_ACKNOWLEDGE question
Date: Thu, 07 Jun 2007 10:01:00 -0000	[thread overview]
Message-ID: <1181189324.13729.57.camel@localhost.localdomain> (raw)
In-Reply-To: <70d4f620706062016s593a05aen95aebfdad3f4ecf@mail.gmail.com>

On Wed, 2007-06-06 at 23:16 -0400, Mike Sweeney wrote:
> I am a little confused about what HAL_INTERRUPT_ACKNOWLEDGE is
> intended to do. The reference manual for eCos says that it is used if
> the interrupt controller requires you to acknowledge an interrupt. The
> reason I am confused is that an interrupt service routine for a device
> may need to clear a status flag in a peripheral status register even
> if there is no interrupt controller. Is the intent that each interrupt
> service routine handle this clearing of the flag in the peripheral
> status register on its own, in addition to calling
> HAL_INTERRUPT_ACKNOWLEDGE for handling anything that has to do with
> the interrupt controller?
> ...

I think this is because the interrupt controller is a shared resource
and there may be some 'stacking' and 'unstacking' of state required to
manage it and the priorities of interrupts that use it.

Each interrupt routine usually has exclusive access to the peripheral
that caused the interrupt and so the routine can directly handle
interrupt-related registers in the peripheral, but some, most, or all
peripheral interrupts might be channelled through the shared interrupt
controller in a target-specific way. Generally, interrupts from higher
priority sources are masked by the interrupt controller until
HAL_INTERRUPT_ACKNOWLEDGE is called. 

If you don't have an interrupt controller, then the
HAL_INTERRUPT_ACKNOWLEDGE macro/function is going to be very small if it
exists at all.

-- 
+---------------------------------------------
| Daniel Helgason <danielh@telus.net>



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

  reply	other threads:[~2007-06-07  4:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07  9:14 Mike Sweeney
2007-06-07 10:01 ` Daniel Helgason [this message]
2007-06-07 11:55   ` Daniel Helgason
2007-06-07 15:11 ` Nick Garnett
2007-06-07 17:02   ` Mike Sweeney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1181189324.13729.57.camel@localhost.localdomain \
    --to=danielh@telus.net \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=msweeney77@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).