How to synchronise 2 PWM in STM8S003F3?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-23 8:19 PM
I need 2 PWM signals each with different frequency and duty cycle. So I'm using TIM1 and TIM2 for this. But these PWMs are not synchronised. Please help me on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-29 10:15 PM
Hi!
I don't really understand what you mean with "synchronized". If you say the 2 PWMs have different frequency how do you want them to be synchronized?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-30 7:34 PM
synchronized means rising edge of both PWMs should match
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-05-27 10:58 PM
You're assuming a lot :)
I would recommend that you carefully study how the timers work (i.e., from the STM8S003F3 datasheet and the RM0016 manual), how they receive a clock, and clearly know your expectations regarding any latency between edges. Then make experiments.
