imx6sl gpio can't enter interruput function

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6sl gpio can't enter interruput function

1,309件の閲覧回数
威杨
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 返答(返信)

1,233件の閲覧回数
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 件の賞賛
返信

1,233件の閲覧回数
威杨
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 件の賞賛
返信