IMX8MP gpio interrupt issue

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

IMX8MP gpio interrupt issue

344件の閲覧回数
ajayvk1
Contributor I

Hi ,

We are using GPIO12 (pin S142) NXP i.MX 8M Plus:  MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x19 for one of our usecase  and configured as a input and we have a externel pull up resistor of 4.7K ohm . When we configure that as only falling edge we are seeing interrupt for both the rising edge and falling edge Please help us in solving this problem what change we need to do for make it work.

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

327件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi 

I would suggest you 

1. Please make sure the gpio  is configured for falling edge only,  for example

interrupt-parent = <&gpio4>;
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;

Ensure you are using IRQ_TYPE_EDGE_FALLING and not IRQ_TYPE_EDGE_BOTH

 

2. check the Pad control flag.

The pad control value 0x19 might not be enabling input correctly,  Try to use a more explicit configuration like

MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x130

where 0x130 enables input /  pull-up / medium drive strength.

 

Regards

Daniel

 

 

 

0 件の賞賛
返信

282件の閲覧回数
ajayvk1
Contributor I

Hi Daniel,
I have tried by setting configuration like
MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x130
But still im facing interrupt is coming for both the edges as we are not using the dtsi file to add like this entry interrupt-parent = <&gpio4>;
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
we have a driver which will have  below code  to request for falling edge only :-

if (request_irq(irqNumber, irq_handler, IRQF_TRIGGER_FALLING, "device", (void *)(irq_handler))) {
printk(KERN_INFO "my_device: cannot register IRQ ");
goto irq;

So please help how to resolve this issue .Is something from GIC will set to both edge type ?

 

0 件の賞賛
返信

214件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi

 

I would suggest you check the GPIO4_ICR2 register,  to get the real trigger type configured.

Bit 6-7 correspond to pin 19.

danielchen_0-1755589193558.png

 

If you are not using DTS,  ensure you explicitly set the IRQ type in your driver before calling request_irq( );

irq_set_irq_type(irqNumber, IRQ_TYPE_EDGE_FALLING);

 

 

Regards

Daniel

 

0 件の賞賛
返信