public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: "Chris Zimman" <czimman@bloomberg.com>
To: "Martin Laabs" <martin.laabs@mailbox.tu-dresden.de>,
	        <ecos-devel@ecos.sourceware.org>
Subject: RE: How to handle very fast repeating interrupts?
Date: Sun, 15 Feb 2009 22:34:00 -0000	[thread overview]
Message-ID: <AE37CDDF7D55EB4AB77E0D63F38594CBF40F@ny2545.corp.bloomberg.com> (raw)
In-Reply-To: <op.upenknmj724k7f@martin_pc.home>

>  i'm using a lpx2214 board which is running with 60MHz.
> Now I have an interrupt every 12us (so 80k per second.)
> The Interrupt handler is very short. It has to read one
> word from the external memeory interface and store it into a
> buffer. This has to happen until the next interrupt will occure
> because otherwise data would be lost.
> Because it has to do so little but so often I'd like to
> avoid the whole interrupt management/routing eCos implements.
> I'd like to configure this interrupt as a FIQ and just want
> to jump to my ISR routine. What do I have to pay attention
> on when doing so?
> I'd write the routine in ASM and store the register I use
> to the stack. (Which stack will I use. The one of the current
> process?)

Not to get of topic, but are you running eCos w/o the scheduler?  Because if
you're not, I don't see how you are going to be able to keep up with the time
interval that you need.

Figuring 1.1 DMIPS/MHz, you have 0.015151515 us/instruction, giving you about
792 instructions per 12us interrupt period, without including any bus wait
states etc. or other losses in time.  Even one context switch from eCos for
whatever reason may cause you to lose data if you really do need to service
it every 12uS.

That said, I would suggest just pointing the FIQ vector directly, and
managing your own stack.  You could just carve out a piece of memory for
yourself (many ways to do this, depending on your application) and use that.

--Chris

  reply	other threads:[~2009-02-15 22:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15 18:13 Martin Laabs
2009-02-15 22:34 ` Chris Zimman [this message]
2009-02-16 10:29   ` Martin Laabs
2009-02-16 12:09     ` Chris Zimman
2009-02-16 12:32       ` Martin Laabs
2009-02-16 12:49         ` Chris Zimman
2009-02-16 12:57           ` Martin Laabs

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=AE37CDDF7D55EB4AB77E0D63F38594CBF40F@ny2545.corp.bloomberg.com \
    --to=czimman@bloomberg.com \
    --cc=ecos-devel@ecos.sourceware.org \
    --cc=martin.laabs@mailbox.tu-dresden.de \
    /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).