For refefence, here's how the hardware works...
The chip is an RX/62T microprocessor, which has hardware specificlaly for motor control (the T series == extra timers). The third-generation multi-timer unit (MTU3) chains two 16-bit timers, three capture registers, and three other control/buffer register together to both track phase counts and measure speed. The speed portion works as follows:
There's a 16-bit counter that runs at a high MHz (2.5 MHz in my case). At each edge of one of the incoming encoder signals, the count value is copied to one of the other registers and then cleared. This means that other register always has the width of the most recent period, to whatever accuracy and range your clock allows.
At 2.5MHz and 16-bit counters, that means the RPM range is 70,000 RPM down to 1.1 RPM, with precision improving from 0.3% at 3000 RPM (my motor's top speed) up to 0.003% at 1.1RPM. With my 20 KHz inner loop rate, that means "one measurement per loop period" happens at 600 RPM. Note: for consistency, I pre-read all my measurements at the start of the loop and use the stored values, rather than re-read that register every time. Since the new PWM values take effect at the start of the *next* loop, that means I'm pretty much always one loop behind on the correlation between measurements and control output. Oh well. The ADC, RPM, and PWM measurements and calculations are carefully choreographed to fit within the PWM waveforms, since my hardware can only measure phase currents when the low-side PWM driver is on (er, Fairchild FNB41560 inverter chip).
Given that my control loop is always a loop behind, which is better? Always using the latest RPM and letting the motor's inertia (at 600+ RPM) do the averaging, or averaging some even-older RPM readings? (hypothetical question, since I can't change my hardware anyway) My opinion is that the hardware is accurate enough that the "noise" is really actual changes in RPM and I should just use the latest values, adjusting the master clock to get the precision I need at my common working RPMs.