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.
Solved! Go to Solution.
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?
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();
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
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.
Hi
I would suggest you check the GPIO register directly , make sure the GPIO interrupt registers especially the interrupt registers are configured correctly,
For MQX v5 is under commercial license.
You can contact mqxsales@nxp.com for fast support.
Regards
Daniel
Okay. I will check and contact there.
Thanks Daniel for your Help.