Pwm mode 2 question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-17 05:50 AM
Hi, I'm studing STM32F4.
I'm looking at pwm mode in timer, and I wonder if there's a difference between using pwm mode 2 and using pwm mode 1 to invert using CCMR1 register.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-17 11:31 PM
Hello @jiu ,
actually they are each other opposite :
You could find the information in the reference manual of stm32f4 :
best regards
Mikael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-18 07:31 AM
> difference between using pwm mode 2 and using pwm mode 1 to invert using CCMR1 register
You mean, is PWM mode 2 identical to PWM mode 1 inverted using TIMx_CCER.CCxP? In the simple case of simple PWM output, yes.
Difference occurs only in more complex usage, involving OCxRef signal, e.g. using the Fast mode (set by TIMx_CCMRx.OCxFE) and OCxRef clear (see TIMx_CCMRx.OCxCE). Output polarity also matters in states involving Break, see Advanced Timers.
JW