cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Advanced Timers question

Bassett.David
Associate III
Posted on July 10, 2012 at 20:12

Hello,

I my application, I need to control multiple ( >3) half bridges and measure current(s) synchronously as well.

Question 1: Is it possible to synchronize the counters of Timer 1 and Timer 8 (and others?) so that match values I load can be based on the same reference?

Question 2:  If the above is not possible, perhaps I could derive the offset between the two timer counters and adjust for it.  Maybe a simultaneous capture from an external event.  Can anyone suggest a more elegant method?

I am experienced with a competitor's PWM (their nicest feature), but do not yet have experience with the STM32's timers - I appreciate any illumination or suggestions you may offer!

Regards,

Dave

#advanced-timers #stm32-pwm-timers
2 REPLIES 2
jpeacock2399
Associate II
Posted on July 10, 2012 at 21:15

You might want to look at the SMCR register for TIM1 and TIM8, in particular the TS and SMS fields.  TIM1 and TIM8 can both be triggered from TIM2, TIM4, or TIM5 events.

  Jack Peacock
Bassett.David
Associate III
Posted on July 12, 2012 at 05:27

Thank you!  It looks like I will use T2 to issue a simultaneous counter reset to T1&T8.  I'm hoping that no synchronization jitter will occur since the reset is issued internally (vs. external source).