46.4.4 Interval Timer
When a motor runs at a very low speed, the encoder does not generate enough pulses for
accurate speed measurement. Therefore, instead of counting the number of pulses, the pulse
duration can be measured. The 32-bit Interval Timer (INTxTMR) register is used to measure the
time interval between each decoded quadrature count pulse when the motor operates at a very
low speed. The timer counts at a rate specified by the INTDIV<2:0> bits
(QEIxCON<6:4>). The interval timer is cleared when the first count pulse is detected.
When the next count pulse is detected, the current contents of the interval timer are
transferred to the Interval Timer Hold (INTxHLD) register, the interval timer is cleared, and
then the process repeats. The interval timer hold registers always contain the most recent
completed timing measurements. The following figure illustrates the timing diagram of the
Interval Timer operation.
Note: If the INTxHLD
register is read when a new position count pulse is detected, the contents of the INTxHLD
register are not updated to avoid incoherent data reading.
