Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Regarding the raising edge interrupt for GPIO in iMX6DQ: (6 Items)
   
Regarding the raising edge interrupt for GPIO in iMX6DQ  
Hi All,
I am trying to use the interrupt option in iMX6DQ for GPIO.I am using the QNX 6.6 . The interrupt API i am using for 
registering is interrupt_attach() with _NTO_INTR_CLASS_EXTERNAL as the flag. 
I am using the edge trigger interrupts ,as if i configure the level triggered interrupt the system is going for a reset 
the moment the interrupt is attached. Whatever edge i am configuring to the GPIO raising edge or the falling egde i am 
always getting the falling edge interrupt.
Has anybody worked on this and have been able to get the raising edge interrupt?
Kindly help i having trying to read the configurations also what ever is configured for the port for the interrupt ,
there i am able to check the configurations as i configured.

Thanks in advance for your help
Re: Regarding the raising edge interrupt for GPIO in iMX6DQ  
Adding to the above query i have a point to say that the interrupt is working for the falling edge and not working for 
raising edge alone.
I am attaching a sample code used for configuration of interrupt
Attachment: Text GPIO_intr_conf.txt 7.39 KB
Re: Regarding the raising edge interrupt for GPIO in iMX6DQ  
Hi Praveen,

Can you try using the attached sample apps?

The mx6gpio utility can be used to configure a GPIO, e.g.
# Configure GPIO1[0] as an input with high-level sensitivity
mx6gpio -i -b1 -p0 -s1


You can then use the irqtest utility to attach to the corresponding IRQ -
in the example above that would be IRQ 160 (decimal).

Thanks,
Mark

Attachment: Text sample_code.tar.gz 5.16 KB
Re: Regarding the raising edge interrupt for GPIO in iMX6DQ  
Hi Mark,
Thank you very much for your response. I have taken the code and have checked it. I was able to check the interrupts but
 what is happenning is that if i configure the edge interrupt either rising edge or the falling edge the interrupt is 
occurring in both the conditions.
Like if i had configured the raising edge i am getting the interrupt in both the rising and the falling edge of the pin.
 It is the same when configuring for the falling edge.
Is it the same condition you are also facing in your test result. In my code i am using the interrupt_attach() API and 
doing a configuration to mask register . 
Re: Regarding the raising edge interrupt for GPIO in iMX6DQ  
Hi Praveen,

Could you check the GPIOx_EDGE_SEL register? Also I'm curious how you're
triggering the interrupt? You could hook up a scope and confirm that the
source that is driving this signal is acting as expected.

I can't say I've seen this behaviour before but I haven't really tested
rising/falling edge GPIO IRQs on mx6 in detail.

Mark

Re: Regarding the raising edge interrupt for GPIO in iMX6DQ  
Hi Mark,
Sorry for so delayed response. I had checked the value of the EDGE_SEL_REG and also the pin status with scope.The pin is
 active low by default and on button press it goes to high state. The edge select register value is 0 wiht the default 
value.