cancel
Showing results for 
Search instead for 
Did you mean: 

STM8L051 TIM2 & TIM3

mjscott
Associate II
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
3 REPLIES 3
Ian Legg
Senior
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 II
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
Senior
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