From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19291 invoked by alias); 8 Mar 2007 17:40:05 -0000 Received: (qmail 19263 invoked by uid 22791); 8 Mar 2007 17:40:05 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Mar 2007 17:39:57 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1HPMak-0000Dj-00; Thu, 08 Mar 2007 18:39:50 +0100 Date: Thu, 08 Mar 2007 17:40:00 -0000 To: Neeraja Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20070308173950.GB9229@lunn.ch> Mail-Followup-To: Neeraja , ecos-discuss@ecos.sourceware.org References: <9372163.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9372163.post@talk.nabble.com> User-Agent: Mutt/1.5.13 (2006-08-11) From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] How to handle IRQ0 interrupt? X-SW-Source: 2007-03/txt/msg00075.txt.bz2 On Thu, Mar 08, 2007 at 02:34:26AM -0800, Neeraja wrote: > > Hi, > I am working on at91rm9200 board. I want to catch the interrupt when the > button is pressed which is connected to IRQ0 line. > But what is happening is that when I run the application the interrupt isr > is being called always irrespective of the button press. > > Can anyone suggest me how to configure so that the interrupt comes only when > the button is pressed ? > > Here is the part of the code I am using > > interrupt = CYGNUM_HAL_INTERRUPT_IRQ0; > cyg_interrupt_create(interrupt, > 0, // Priority - what goes > here? > (cyg_addrword_t)0, // Data item passed to > interrupt handler > (cyg_ISR_t *)IRQ0_isr, > (cyg_DSR_t *)IRQ0_dsr, > &interrupt_handle, > &interrupt_object); > > cyg_interrupt_attach(interrupt_handle); > cyg_interrupt_acknowledge(interrupt); > cyg_interrupt_unmask(interrupt); Please show us the code which you use the setup the PIO. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss