cancel
Showing results for 
Search instead for 
Did you mean: 

How to multiply TIMers outputs?

Endika Caño de Miguel
Associate II
Posted on October 25, 2017 at 11:43

Hello everybody:

I would like to multiply the outputs I get from TIM3_PWM (64KHz signal) and TIM4_PWM(8MHz signal) in order to get a new signal.

The thing is that I don�t know how to do it and I�m pretty lost. 

By the way is it possible to assign variables to the timers? and if so, how can I do it?

Thank you in advance.

Endika 

#timer #stm32-f4 #tim #multiply #variable
3 REPLIES 3
Posted on October 25, 2017 at 12:22

You can set TIM4's OCxREF as TRGO in TIM4_CR2.MMS, set TIM3's TRGI source to TIM4 in TIM3_SMCR.TS, and set TIM3 slave controller to Gated Mode in TIM3_SMCR.SMS - that should suffice.

By the way is it possible to assign variables to the timers?

I don't understand, please explain.

JW

Posted on October 26, 2017 at 12:03

Yes, I´m asking if this is possible:

HAL_TIM_PWM_Start(&htim3,TIM_CHANNEL_2) = a;  

For example

Posted on October 26, 2017 at 12:13

No.

JW