AnsweredAssumed Answered

Changing Timer Triggers on the Fly...

Question asked by ninja69 on Nov 7, 2013
Latest reply on Nov 7, 2013 by ninja69
I have designed a variable pulse generator using the STM32F4 and using 7 timers which outputs on three pins, using AF pin couplings to TIM1/TIM8/TIM9(all operated in OPM mode) because I wanted the 6ns resolution provided by their 168Mhz clocks.

Here is how I have my setup:

TIM2 is MASTER and provides the main frequency to three SLAVE timers TIM3, TIM4, and TIM5, these three SLAVES and then MASTERS to TIM1, TIM8, and TIM9.

So:

TIM2(frequency)->TIM3(phase control)->TIM9(pulse width control)(to AF pin)

TIM2(frequency)->TIM4(phase control)->TIM1(pulse width control)(to AF pin)

TIM2(frequency)->TIM5(phase control)->TIM8(pulse width control)(to AF pin)

So, as you can see, I need everything to be IN SYNC, and I need to have a main frequency, and I need to have phase control so I can operate the three outputs ideally with 120d phase control, and I need pulse width control which is variable to each of the outputs.

SO...

To my main question then...

Is there anyway to have all of that which I have listed above with less timers?

One way I thought of was using one main timer as master and having three slave timers hooked to AF pin outputs and being able to change ON THE FLY the TRGO output for the main timer, is this possible?

Like being able to change from OC1Ref to OC2Ref to OC3Ref and back again, on the fly?

Thanks!

Outcomes