Skip to main content
mjscott
Visitor II
June 20, 2014
Question

STM8L051 TIM2 & TIM3

  • June 20, 2014
  • 3 replies
  • 1422 views
Posted on June 20, 2014 at 14:21

Can TIM2 or TIM3 be attached to a quadrature encoder and up/down count? The data sheet says yes, but the reference manual is vague. Has anyone attached an encoder to these Timers yet?

#quadrature-encoder-rotary-tim3 #stm8l-tim2-/-tim3
This topic has been closed for replies.

3 replies

Ian Legg
Visitor II
October 29, 2014
Posted on October 29, 2014 at 13:52

Did you ever get a reply to this question as I too was wondering the same thing!? However, from what I've seen built in support for quadrature encoders via timers appears to only exist in the 32 bit devices.

Thanks,

Ian

zzdz2
Associate
October 30, 2014
Posted on October 30, 2014 at 10:49

I think the manual is quite clear, only advanced timer TIM1 has encoder modes.

The relevant settings are marked as reserved in general purpose timers(SMCR_SMS).

I suppose it's a bug in datasheet.

Ian Legg
Visitor II
January 6, 2015
Posted on January 06, 2015 at 10:08

Hello,

Does anyone know if there is any example code showing how to use a detent rotary encoder with TIM1 in encoder mode?

Thanks,

Ian