imx6sl gpio can't enter interruput function

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx6sl gpio can't enter interruput function

911 次查看
威杨
Contributor III

Hello

   I use imx6sololite's gpio interrupts in our custom board. I meet some probloms as follow:

  configuration:

  PIN: GPIO2_16 :

temp = 0;
temp = readl(GPIO2_GDIR);
temp &= (~(1 << 16));
writel(temp, GPIO2_GDIR);

temp = 0;
temp = readl(GPIO2_ICR2);
temp |= (1 << 0) | (1 << 1);
writel(temp, GPIO2_ICR2);

temp = readl(GPIO2_IMR);
temp |= (1 << 16);
writel(temp, GPIO2_IMR);

PIN:GPIO3_15

temp = 0;
temp = readl(GPIO3_GDIR);
temp &= (~(1 << 15));
writel(temp, GPIO3_GDIR);

temp = 0;

temp = readl(GPIO3_ICR1);
temp |= (1 << 31) | (1 << 30);
writel(temp, GPIO3_ICR1);

temp = 0;
temp = readl(GPIO3_IMR);
temp |= (1 << 15);

writel(temp, GPIO3_IMR);

GPIO3_15 can enter interrupt funcution,working normal,but GPIO2_16 not working,could you give me some advice...

Thanks........

标签 (1)
0 项奖励
回复
2 回复数

835 次查看
igorpadykov
NXP Employee
NXP Employee

Hi wei

please check if this pin is not used in other way (for example by other module

or in uboot), also one can attach jtag and check its register settings.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

835 次查看
威杨
Contributor III

Thanks for your answer,but i only regeister gpio function  and read back,i under uboot read gpio2_16 and gpio3_15

gpio2_16:  020a0004: 00000000 

                  020a0010: 00000003 

                  020a0014: 00010000

gpio3_15:

                 020a4004: 00000000

                 020a400c: c0000000

                 020a4014: 00008000

pastedImage_1.png

gpio only regeister interrupt function,but gpio3 working nornal ,gpio2 not working,please help me.......

Thanks

0 项奖励
回复