lwgpio Interrupt for some pins not working

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

lwgpio Interrupt for some pins not working

Jump to solution
1,577 Views
Satish_Davare
Contributor II

Hello,

I am using MQXV5 with IAR for i.MXRT1064. Need 5 GPIO pins as interrupt.

I have taken example code as reference and converted code for 5 pins. while testing following code  knob close is interrupting but knob open is not interrupting. Same happening with other pins also. 

debug print: lwgpio_int_get_vector() vector addresses are 88 and 87. 

Is there any further pin definitions required?

What is missing here?

Many thanks in advance for your inputs. 

0 Kudos
Reply
1 Solution
1,520 Views
Satish_Davare
Contributor II

Okay. I will check and contact there. 

Thanks Daniel for your Help.

View solution in original post

0 Kudos
Reply
6 Replies
1,550 Views
danielchen
NXP TechSupport
NXP TechSupport

 

void ISR_KNOB_OPEN(void *pin)
{
lwgpio_int_clear_flag((LWGPIO_STRUCT_PTR) pin); /* Interrupt clear */
_lwsem_post(&lwsem_close_knob); /* Semaphore post */
}

Please check whether lwsem_close_knob is the right semaphore in ISR_KNOB_OPEN?

 

 

0 Kudos
Reply
1,538 Views
Satish_Davare
Contributor II

Hi,

I need only one semaphore for any one pin interrupt. So, Now I have used lwsem_close_knob (Need to change it's name) semaphore for both ISR. This code is in CPP. 

It get called from another task by following code.

KnobSenseCls *knobSenseObsPtr = new KnobSenseCls;
u8KnobReadData = knobSenseObsPtr->readKnobStatusByInterrupt();

 

0 Kudos
Reply
1,564 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Satish:

Do you mean only one pin can trigger interrupt?  Can you disable knob_close, and only test knob_open, can it work>

 

Regards

Daniel

0 Kudos
Reply
1,556 Views
Satish_Davare
Contributor II

Hi danielchen,

Thanks for your reply.

I have checked by disabling Knob_Close code completely and Enabling only Knob_open Code. Knob_Open is not working by any case. 

Further, I have Another Polling APIs for both pins. They are working well and getting right status of both pins. That means pin assignments are right. 

0 Kudos
Reply
1,525 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

 

I would suggest you check the GPIO register directly , make sure the GPIO interrupt registers  especially the interrupt registers are configured correctly,

 

danielchen_0-1604475982853.png

For MQX v5 is under commercial license.  

You can contact mqxsales@nxp.com for fast support.

 

Regards

Daniel

 

 

0 Kudos
Reply
1,521 Views
Satish_Davare
Contributor II

Okay. I will check and contact there. 

Thanks Daniel for your Help.

0 Kudos
Reply