17.4.8 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) 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 in the QEIx Control register (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 Hold register (INTxHLD), the Interval Timer is cleared and then the process repeats. The Interval Hold registers always contain the most recent completed timing measurements. The Interval Timer is automatically cleared when the module gets disabled. Figure 17-7 illustrates the timing diagram of the Interval Timer operation.