GPIO2 irq interrupt question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO2 irq interrupt question

621 Views
caoping
Contributor II

hi,every!

     now we use imx53 to develop,and software environment is linux, and we want to response a rising interrupt of 14 pin of GPIO2(IRQ number in datasheet is 52),Once we set ICR14 of GPIO2 to "0x10",and set the 14 bit of GPIO2_IMR to "1",when we use "request_irq(irq, irq_handle_function,0, interface, NULL)" in driver,and the return value is 0xfffffffea,and then the serial terminal displays"failed",Does anyone meet this!

Labels (1)
0 Kudos
1 Reply

383 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,cao,

      Please try to do it like this :

At first , I assume you use GPIO3_2, Then

#include <mach/gpio.h>

#define MY_GPIO3_2   (2x32 + 2)

int irq = gpio_to_irq( MY_GPIO3_2);

request_irq(irq, irq_handle_function,0, interface, NULL);

....

Try it please !

Regards,

weidong