Once set up and the interrupts are enabled, you will get an EXTI15_10_IRQHandler interrupt on every falling edge of the encoder input as the user turns the encoder.
I enabled CC interrupt on TIM4 Channel1. When an interrupt occurs due to a rising edge on TI1, I read the TIM4-> CNT register in the interrupt handler.
It is working, however I have two concerns with this workaround:
The interrupt is occurs not due to a change in CNT but to a change in one of the encoder phases
Because of the former, the interrupt occurs just at the beginning or middle of a counting phase. This also depends on the direction of rotation.
I remember we played around a bit before we decided on this solution. Our interrupt is triggered off encoder A and when we get the interrupt we sample the encoder B level. If the encoder B level is high during encoder A interrupt, the encoder is turning one way. If encoder B is low, it is turning the other.