2017-02-27 11:47 PM
Hello everyone,I would like to measure frequency of two different signals using STM32Fxx timers'but i have problems setting two different timers to work simultaneously .thanks for your help.
2017-02-28 03:22 AM
Hello,
Please refer to the TIM examples available on the STM32CubeFx package, this will help you on how to use the TIM peripheral to measure the frequency.
Regards
Imen
2017-02-28 04:48 AM
Thanks Imen.I have already did that, and succeed to measure frequency and duty cycle of one signal.
I can't succeed to do that for 2 signals simultaneously.
I try to use two timers peripherals(TIM3 and TIM4), but I have problem in setting both timers in my code.
Thanks.
2017-02-28 06:16 AM
Hi,
Which family device are you using ?
Could you please describe more your problem : if you have issue in the configuration of TIM3 and TIM4 to measure the frequency and duty cycle of the signal. Or your issue is in the start of TIM3 and TIM4 simultaneously?
Imen
2017-02-28 08:03 AM
Hi,
I am using STM32F407 device.
I succeed to measure frequency and duty cycle with each timer separately. I have an issue in start of TIM3 and TIM4 simultaneously.(probably I write something wrong in my code).
Thanks a lot.
2017-02-28 09:19 AM
One could use a single timer pairing channel 1 & 2, and 3 & 4 to time stamp the edges of two input signals. Input Capture on a free running 32-bit TIM. Interrupting would limit upper frequency support.
2017-02-28 09:21 AM
If the frequency and duty are different why wouldn't PWM Input suffice, why would the timers need to start simultaneously?
2017-03-01 05:33 AM
Hi Shlomi,
You can share your code to check your configuration and identify what is going wrong.
Imen
2017-03-01 07:27 AM