I.MX 8M MINI Interrupt

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

I.MX 8M MINI Interrupt

1,027件の閲覧回数
dan_hilgert
Contributor II

I want to make the GPIO pin assigned to my RTC a falling edge interrupt.

This is what I have done so far:

Defined the pin node

         dan_hilgert_0-1608323564774.png

Defined I2C node for the RTC and designated interrupt info

       dan_hilgert_1-1608323633916.png

Compile new .dtb and scp the file to the board

Finally, when I execute a ' cat /proc/interrupts' the interrupt always shows up as a level interrupt and never and edge like I defined it to be. 

       

dan_hilgert_3-1608324391712.png

Looking at the datasheet, it appears each pin can be assigned as a high or low level as well as falling or rising edge interrupt. 

When I test the interrupt functionality this is what I see:

  • Line pulled high no interrupts generated
  • Line pulled low, continuous interrupts generated

Can someone point me in the right direction to identify what I am doing wrong or missing here? 

 

Thanks,

Dan

 

0 件の賞賛
3 返答(返信)

984件の閲覧回数
dan_hilgert
Contributor II

I think I figured out what's going on. I believe the device tree interrupt configuration be overwritten by the device driver. 

dan_hilgert_0-1609689316652.png

I am fairly new to embedded Linux applications, but I assume a device driver can overwrite the info the device tree is telling the kernel. Can you confirm? 

0 件の賞賛

974件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

 

NO, device tree can not be changed by driver.The code you show just judge the trigger type to handle irq.For example, if you define the gpio irq is type of low trigger.The driver find current irq is low and it will call m4lt80_handle_irq.

 

BR

 

Zhiming

0 件の賞賛

1,016件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

You can use our gpio config tool to generate dts code https://www.nxp.com/design/designs/pins-tool-for-i-mx-application-processors:PINS-TOOL-IMX

 

BR

Zhiming

0 件の賞賛