Odd encoder filter behavior
I'm using a Nucleo-F746ZG with timer 2 as a quadrature encoder input. I'm feeding it quadrature signals from 2 GPIOs at 250Hz (each phase is 1mS).
The CDR value is 0, so FDTS should be CLK_INT (36MHz for APB1). With both inputs' filter set to 8, the quadrature counter works flawlessly, counting from 0 to 10,000 and back to 0 for 60+ hours. A filter setting of 10 also works flawlessly. On my ancient 20Mhz scope the GPIO signals are very clean with a low drive setting.
Setting the filter to 9 produces random, spurious counts.
I'm not sure why this notch should exist. My calculations are that a filter of 8 takes 1.33uS to match, 9 is 1.78uS, and 10 should take 2.22uS. If 8 < 9 < 10 how does 8 and 10 work and 9 does not? Shouldn't a filter setting of 9 also have a 1000x chances to match the input (2mS / 1.78uS).
I also see the filters >=12 start to prevent accurate counts. Again, these seem very fast compared to a 250Hz input signal and it seems they should all match OK.
Thanks!!
