I am using the INDEX signal on an external quadrature encoder to generate an interrupt. I have this working in general however I would like to be able to select whether the interrupt occurs on the rising edge or the following edge of the INDEX signal.
I see this option on the CTRL->XNE control bit however this is for determining which edge of INDEX resets the position counter. I would like to generate the interrupt on the falling/rising edge of INDEX without resetting the position counter. Is this possible?
Thank you so much for your interest in our products and for using our community.
Based on the Control Register (CTRL), I understand that it is possible to generate the interrupt without the INDEX pulse initializes the position counter.
For this you must configure XIE->1, XIP->0, and XNE depending on your choice. With that the INDEX interrupt occurs when XIRQ is set.
Hope it helps you. Please let me know if you have more questions about it.
Have a nice day!
My mistake. I am using MIMXRT1166DVM6A
Which MPU/MCU are you using?