Hello
I am using the QEI to read the current position of a rotary dial knob with A/B signals (ALPS EC11B15242AF). To improve the reaction on slow or quick rotation I wanted to use the velocity value provided by the QEI but at low speed the QEI_O_SPEED register sometime counts much more pulses then It can be during the measuring interval.
Here the configuration of QEI:
// Enable and configure Quadrature Encoder Interface HWREG(QEI0_BASE + QEI_O_CTL) |= QEI_CTL_FILTCNT_M; // Set maximal input filter value HWREG(QEI0_BASE + QEI_O_CTL) |= QEI_CTL_FILTEN; // Enable input filter QEIConfigure(QEI0_BASE, QEI_CONFIG_CAPTURE_A_B | QEI_CONFIG_NO_RESET | QEI_CONFIG_QUADRATURE | QEI_CONFIG_SWAP, UINT32_MAX); QEIPositionSet(QEI0_BASE, 0); QEIEnable(QEI0_BASE); // Enable and configure the velocity counter QEIVelocityConfigure(QEI0_BASE, QEI_VELDIV_1, 4E6 - 1); QEIVelocityEnable(QEI0_BASE);
Any idea?
Thanks for any help