Error on Request interrupt on AT91SAM9260-EK

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

Reply to
João Paulo Bodanese
Loading thread data ...

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
Reply to
Not Really Me

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/
Reply to
Boudewijn Dijkstra

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.