title: STM32: How to configure timer to trigger interrupt in every increments in quadrature encoder mode?
body: <p>I have a rotary encoder with STM32F4 and configured TIM4 in &quot;Encoder Mode  TI1 and TI2&quot;. I want to have an interrupt every time the value of timer is incremented or decremented.</p>
  <p>The counting works but I only can configure an interrupt on every update event, not every changes in TIM4-&gt;cnt. How can I do this?</p>
  <p>In other words: My MCU+Encoder in quadrature mode could count from 0 to 99 in one revolution. I want to have 100 interrupts in the revolution but if I set TIM4-&gt;PSC=0 and TIM4-&gt;ARR=1, results 50 UPDATE_EVENTs, so I should set ARR=0 but it does not work. How can I sole that?</p>