Tool/software:
Hello,
I am using the eQEP module on F28031, and I have a question about how QPOSCNT behaves when an index event (Z-phase) occurs.
-
According to the TRM, at every index event the position-counter value is latched into QPOSILAT and QPOSCNT should be either 0 or QPOSMAX.
-
If the latched value is not equal to 0 or QPOSMAX, then QEPSTS[PCEF] and QFLG[PCE] are set.
My concern is the following:
-
If an index pulse (Z) occurs at a non-origin position (for example, due to noise on the Z signal), will QPOSCNT still be reset to 0?
-
In my tests, I cannot see index events on the oscilloscope, but I suspect that noise may be triggering false Z pulses.
-
This could cause QPOSCNT to reset unexpectedly and shift the origin.
-
-
If this happens, how should we handle it in software?
-
Can we rely on QEPSTS[PCEF] and QFLG[PCE] to detect and ignore such invalid index events?
-
What is the recommended way to keep QPOSCNT aligned to the correct mechanical position when a false index occurs?
-
Additional details:
-
The motor mechanical range is only 95° (it never makes a full 360° rotation).
-
Current configuration:
Because the motor never reaches a full rotation, Z-phase should not normally appear in the operating range.
That’s why I suspect noise is creating false Z events that reset QPOSCNT.
What is the recommended way to robustly avoid false origin shifts in this kind of limited-rotation application?
Thank you in advance.