Problem measuring two signals frequencies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 3: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
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 4: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 6: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
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 8: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 9: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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 9:21 AM
If the frequency and duty are different why wouldn't PWM Input suffice, why would the timers need to start simultaneously?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-01 5:33 AM
Hi Shlomi,
You can share your code to check your configuration and identify what is going wrong.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-01 7:27 AM
