how to config gpio interrupt in imx6qsabresd?

cancel
Showing results for 
Search instead for 
Did you mean: 

how to config gpio interrupt in imx6qsabresd?

371 Views
Contributor II

Hi, all

i'm used linux 14.04.5 and kernel 3.0.35-4.1.0+yocto+gbdde708.

My board is connected to the GPS PPS signal line and CSI0_DAT6.

I want to generate an interrupt when a signal is received.

what should I do?

menuconfig? board-mx6q_sabresd.c or board-mx6q_sabresd.h edit?

please, Tell me...

Sorry. I can not speak English well. I hope you understand.

4 Replies

54 Views
NXP TechSupport
NXP TechSupport

Hi jun

one can look at below thread

Proper GPIO interrupt handling in iMX6 

various examples, like configuring touch interrupt can be found in

linux/../mach-mx6/board-mx6q_sabresd.c

Linux-3.0.35_4.1.0

https://www.nxp.com/webapp/Download?colCode=L3.0.35_4.1.0_ER_SOURCE_BSP&appType=license&loca...

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

54 Views
Contributor II

Thanks, igor.

But I hope to have a more detailed explanation.

I want to interrupt the signal that occurs once a second, and to count the sysclk between the signals.

I downloaded the package(https://www.nxp.com/webapp/Download?colCode=L3.0.35_4.1.0_ER_SOURCE_BSP&appType=license&loca...) but it did not help. I even had it already.

Is there any other way? I want you to remember that I am a beginner.

0 Kudos

54 Views
NXP TechSupport
NXP TechSupport

Hi jun

for beginners suggest to start with linux tutorial:

Linux Device Drivers, Third Edition [LWN.net] 

Best regards
igor

0 Kudos

54 Views
Contributor II

Hi, igor

I modified the source code to use "CSI0_DAT6" as the GPIO pin.

arm/mach-mx6/board-mx6q_sabresd.h

board_mx6q_sabresd_h.PNG

arm/mach-mx6/board-mx6q_sabresd.c

I added the code.

board_mx6q_sabresd_c1.PNG

Is that right?

If so, what should we do next?

0 Kudos