Error on Request interrupt on AT91SAM9260-EK

Mar 03, 2009 2 Replies

Hi,



I am trying to request an interrupt on IRQ 63, but when i load the module i got the message:



setting trigger mode 2 for irq 63 failed (gpio_irq_type+0x0/0x2c) IRQ 63 is not free.



The code is:



if (request_irq(gpio_to_irq (AT91_PIN_PA31),interrupt_count,IRQF_TRIGGER_FALLING,"Reset_Fabrica",NULL)) { printk(KERN_WARNING "IRQ %d is not free.\n", AT91_PIN_PA31); return -EBUSY; }


Actually, any IRQ i try to request i got the message that the IRQ isn't free.



# cat /proc/interrupts CPU0



1: 103537 AIC at91_tick, rtc0, ttyS0
9: 11 AIC mmc0
10: 0 AIC at91_udc
13: 15 AIC atmel_spi.1
14: 0 AIC at73c213
20: 0 AIC ohci_hcd:usb1
21: 1795 AIC eth0
62: 1 GPIO Button 3
101: 1 GPIO at91_udc Err: 0

Any ideia?



Regards


I must be missing something here. The AIC in the SAM9260 only has 32 interrupts. Are you using a linix implementation that supports a software interrupt mechanism?

Scott Validated Software Lafayette, CO

Commonly, each individual GPIO pin interrupt is assigned a virtual interrupt numbers cascaded from the GPIO block interrupt handler.

I guess that gpio_to_irq() converts the virtual interrupt number into the GPIO block interrupt number, which is not free (duh). Besides that, it would only make sense to set a trigger mode on a GPIO interrupt if the GPIO interrupt handler implements a mode filter in software, because the hardware doesn't support mode setting on individual GPIO pins.

Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required