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

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

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

Jump to solution
1,334 Views
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 ?

Labels (2)
0 Kudos
Reply
1 Solution
1,166 Views
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

View solution in original post

0 Kudos
Reply
5 Replies
1,288 Views
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 Kudos
Reply
1,270 Views
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 Kudos
Reply
1,244 Views
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 Kudos
Reply
1,241 Views
Jimmychea
Contributor III

Cannot be using IOCTL command ?

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