From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15046 invoked by alias); 15 Feb 2009 22:34:09 -0000 Received: (qmail 15035 invoked by uid 22791); 15 Feb 2009 22:34:09 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mgcn1.bloomberg.com (HELO mgcn1.bloomberg.com) (199.172.169.46) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Feb 2009 22:34:04 +0000 Received: from ny2570.bloomberg.com ([172.20.72.138]) by mgcn1.bloomberg.com with ESMTP; 15 Feb 2009 17:32:28 -0500 Received: from ny2528.corp.bloomberg.com (ny2528.corp.bloomberg.com [172.20.85.39]) by ny2570.bloomberg.com (8.14.1/8.14.1) with ESMTP id n1FMXtWA009663; Sun, 15 Feb 2009 17:33:55 -0500 Received: from ny2545.corp.bloomberg.com ([172.20.73.98]) by ny2528.corp.bloomberg.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 15 Feb 2009 17:33:55 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: How to handle very fast repeating interrupts? Date: Sun, 15 Feb 2009 22:34:00 -0000 Message-ID: In-Reply-To: From: "Chris Zimman" To: "Martin Laabs" , X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-02/txt/msg00004.txt.bz2 > 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 ti= me interval that you need. Figuring 1.1 DMIPS/MHz, you have 0.015151515 us/instruction, giving you abo= ut 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