cancel
Showing results for 
Search instead for 
Did you mean: 

TIMER in cascade mode example request

giuseppe239955_stm1
Associate II
Posted on October 25, 2013 at 10:06

Hi to everybody,

I'm new to STM32F303, my ploblem is I'm not able to found a valid example on where is showen how to configure two timers in the way to use the first one to acquire an encoder's pulses and the second one to measure the encoder's pulses.

Can someone post a snippet of code?

I think the STM32F30x's reference manual is very poor in explanation about how to cascade timers.

Thank you,

  Giuseppe 
2 REPLIES 2
Posted on October 25, 2013 at 12:37

TIM2 is 32-bit, use that for the encoder?

The master/slave cascading of timers is complicated, there are perhaps some examples in the other firmware libraries, suggest you review those and see if they are enlightening.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
giuseppe239955_stm1
Associate II
Posted on October 25, 2013 at 13:03

Hi Clive,

thank you for the quick response.

I think to have checked all the examples I know, about cascading timers, but unfortunately I wasn't able to find a understable diagram on how to do it.

From my point of view I'd like to use the TIM3 in encoder mode, and TIM2 as input capture mode. I really not understand how to configure TIM3 in order to set a trigger to TIM2 every edge of the XORed CH1,CH2 inputs. Does exist an example about how to config that TIMs in the way I described?

Regards,

  Giuseppe