Skip to main content
jpeacock2399
Associate III
December 6, 2011
Question

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

  • December 6, 2011
  • 0 replies
  • 551 views
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
This topic has been closed for replies.