I.MX 8M MINI Interrupt

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

I.MX 8M MINI Interrupt

1,396 Views
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 Kudos
Reply
3 Replies

1,353 Views
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 Kudos
Reply

1,343 Views
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 Kudos
Reply

1,385 Views
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 Kudos
Reply