How to use the GPIO External IO Expander on I.MX8M Plus EVK as GPIO interrupt ?

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

How to use the GPIO External IO Expander on I.MX8M Plus EVK as GPIO interrupt ?

跳至解决方案
1,437 次查看
Jimmychea
Contributor III

Hi, i had tried to use the IOCTL in linux to set the GPIO pin on External IO Expander on I.MX8M Plus EVK to became Interrupt pin (Rising edge trigger), but i got the error message on terminal which unable to set the rising on that GPIO pin. May i know how to solve it ?

标签 (2)
0 项奖励
回复
1 解答
1,269 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @Jimmychea,

I hope you are doing well.

Sorry for not getting back to you sooner.
 
Yes, it is possible.
 
As mentioned in the README file, the libgpiod package also uses the IOCTL within it.
Implementing the IOCTL command for the custom application is also possible.  For that one needs to make changes inside the driver to constantly monitor the interrupt on a pin. 
and the IOCTL should be answered upon the interrupt.
 
Thanks & Regards,
Dhruvit Vasavada

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,391 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @Jimmychea,

I hope you are doing well
 
For the configuration of the interrupt on the IO expander, One can refer to the below thread for the IMX8MM.
 
To use the particular GPIO as an interrupt(IOEXP_nINT), kindly refer to the Design files of the IMX8M Plus EVK rev. you are using.
 
Thanks & Regards,
Dhruvit Vasavada
0 项奖励
回复
1,373 次查看
Jimmychea
Contributor III

Expander GPIO already exposed to /dev/gpiochip5, i intend to use IOCTL command to monitor interrupt pin 8 on /dev/gpiochip5, may i know how to do that ?

0 项奖励
回复
1,347 次查看
Dhruvit
NXP TechSupport
NXP TechSupport
 
I hope you are doing well.
 
To monitor the event on the GPIO pin, one can use the 'gpiomon' command from the libgpiod package.  
 
Please refer to the below file for more information 
 
Thanks & Regards,
Dhruvit Vasavada

0 项奖励
回复
1,344 次查看
Jimmychea
Contributor III

Cannot be using IOCTL command ?

0 项奖励
回复
1,270 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @Jimmychea,

I hope you are doing well.

Sorry for not getting back to you sooner.
 
Yes, it is possible.
 
As mentioned in the README file, the libgpiod package also uses the IOCTL within it.
Implementing the IOCTL command for the custom application is also possible.  For that one needs to make changes inside the driver to constantly monitor the interrupt on a pin. 
and the IOCTL should be answered upon the interrupt.
 
Thanks & Regards,
Dhruvit Vasavada

0 项奖励
回复