cancel
Showing results for 
Search instead for 
Did you mean: 

Timer count (CNT register) exceeds auto-reload (ARR) in encoder mode

jpeacock2399
Associate II
Posted on December 07, 2011 at 00:18

On an STM32F103Z (ST3210E eval) I set up TIM4 in encoder mode, QEI interface with phase A on CH1 and phase B on CH2.  Encoder mode is T1T2, triggering on falling edge of either phase.  The encoder is a 400 position optical wheel, so I set the auto reload to 399.

The problem is the count register (TIM4_CNT) sometimes shows 400 instead of rolling over at 399 back to zero.  Otherwise the timer is working as expected, tracking direction and position ticks.

What condition allows a timer to exceed the reload when in encoder mode?

  Jack Peacock

#timer-encoder-qei
0 REPLIES 0