issue setting GPIO to active low to handle interrupt queries on imx6

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

issue setting GPIO to active low to handle interrupt queries on imx6

877 Views
rfonck
Contributor I

Hi, 

I'm working on a project that require handling interrupt queries from a FPGA. These interrupt queries are sent on a GPIO. 

 

I tested interrupt query handling in C# (.NET) for the pin MXM_5 with the following program:

static int Main(string[] args)
        {

            int gpioBank = 1;
            int gpioLine = 6;
 
 
            LibGpiodDriver gpiodDriver = new LibGpiodDriver(gpioBank);
            GpioController gpioController = new GpioController(PinNumberingScheme.LogicalgpiodDriver);
 
            gpioController.OpenPin(gpioLinePinMode.Input);

            while(true)
            {
                gpioController.WaitForEvent(gpioLinePinEventTypes.RisingSystem.TimeSpan.FromSeconds(300));
                Console.WriteLine("hello world!");
            }

            return 1;
        }

 

it worked as I wanted it because when I apply a tension on the pin, the program displayed "hello world".

After that I changed the values in order to detect interrupt queries on the pin 11. 

            int gpioBank = 5;
            int gpioLine = 10;
 
 
But It don't work the same way. This pin have a default value to high and the interrupt is not detected when the tension is applied.
 
How is it possible to change the default value of my gpio to activ-low ? 
 
Best regards,
rfonck

 

 

 

Labels (2)
0 Kudos
Reply
1 Reply

869 Views
igorpadykov
NXP Employee
NXP Employee

Hi Romain

 

default state is described in Table 96. 21 x 21 mm Functional Contact Assignments

and it can not be changed

i.MX 6Dual/6Quad Applications Processors for Consumer Products - Data Sheet

so one can try to set necessary level before enabling interrupts in custom program,

use as example   https://github.com/RT-Thread/rt-thread/tree/master/bsp/imx6sx/iMX6_Platform_SDK/sdk/drivers/gpio

 

Best regards
igor

0 Kudos
Reply