This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: How to handle IRQ0 interrupt?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]