AnsweredAssumed Answered

Handling GPIO Interrupts

Question asked by Tingan Ho on Oct 22, 2015
Latest reply on Oct 22, 2015 by igorpadykov

Hi, my name is Tingan and I'm a software engineer that just became a hardware engineer. So I'm rather a beginner in hardware and I'm almost finished with the schematics of my first i.MX6 based board. I'm following the HW Design Guideline for my i.MX6 CPU. And I'm right now implementing the schematics for the Ethernet PHY LAN8720 device. LAN8720 device has an interrupt pin. I know that interrupts, interrupts the CPU and points it to execute something else. But I can't find specifics! about how to implement GPIO interrupts. Like what code needs to be implemented to enable this interrupt pin? I have searched the whole Internet and looked at all StackOverflow answers and downloaded nearly all Freescale's documents(including Linux Reference Manual) related to this and I find nothing specifics about how to handle GPIO interrupts. I have searched for 5 days and found nothing specific about this topic or nothing that could help me, so I'm quite desperate for a detailed answer.


So far my hunch tells me that I should write some code in the Linux Kernel and then build the kernel image and then boot it up with uboot. But what kind of code should I write? Can someone explain this to a beginner HW Enginner, especially write a very detailed answer with code examples, and using the LAN8720's interrupts as an example? And also if I write code on the Linux Kernel where do I get an i.MX6 supported kernel? LTIB? Do I need use or write a device tree to boot?