From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30821 invoked by alias); 9 Mar 2007 12:55:38 -0000 Received: (qmail 30811 invoked by uid 22791); 9 Mar 2007 12:55:38 -0000 X-Spam-Check-By: sourceware.org Received: from www.nabble.com (HELO talk.nabble.com) (72.21.53.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 Mar 2007 12:55:32 +0000 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HPed8-0003g0-RH for ecos-discuss@ecos.sourceware.org; Fri, 09 Mar 2007 04:55:30 -0800 Message-ID: <9393816.post@talk.nabble.com> Date: Fri, 09 Mar 2007 12:55:00 -0000 From: Neeraja To: ecos-discuss@ecos.sourceware.org In-Reply-To: <015001c761a8$947d5430$8d7ba8c0@PAULD> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: neeraja.kothala@gmail.com References: <9372163.post@talk.nabble.com> <015001c761a8$947d5430$8d7ba8c0@PAULD> 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: [ECOS] RE: How to handle IRQ0 interrupt? X-SW-Source: 2007-03/txt/msg00078.txt.bz2 Hi, I have confiured the interrupt as positive edge triggered interrupt using the api cyg_interrupt_configure(interrupt,level,up); Then it stopped giving interrupt continuously and not interrupting even when the button is pressed. This is the code I am using to set up the PIO *AT91C_PIOB_PDR = 0x20000000; //PB29 - corresponds to IRQ0 *AT91C_PIOB_ASR = 0x20000000; *AT91C_PIOB_BSR = 0x0; Is there any thing that I am missing? Any suggestions what else can be done? Regards, Neeraja. Paul D. DeRocco wrote: > >> From: Neeraja >> >> 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. > > Do you mean it interrupts over and over, and never leaves time for the > application? This can happen if it's programmed to be level-sensitive > instead of edge-sensitive. > > Also, remember that mechanical switches need debouncing. This is why I > prefer polling switches at a 10ms-20ms rate, since that's fast enough for > human input, and slow enough not to see the bounce. > > -- > > Ciao, Paul D. DeRocco > Paul mailto:pderocco@ix.netcom.com > > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss > > > -- View this message in context: http://www.nabble.com/How-to-handle-IRQ0-interrupt--tf3368441.html#a9393816 Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss