how to config gpio interrupt in imx6qsabresd?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

how to config gpio interrupt in imx6qsabresd?

2,302 次查看
magicarrow98
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.

标记 (2)
4 回复数

1,985 次查看
igorpadykov
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

1,985 次查看
magicarrow98
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 项奖励
回复

1,985 次查看
igorpadykov
NXP Employee
NXP Employee

Hi jun

for beginners suggest to start with linux tutorial:

Linux Device Drivers, Third Edition [LWN.net] 

Best regards
igor

0 项奖励
回复

1,985 次查看
magicarrow98
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 项奖励
回复