Skip to main content
filipevandoma
Visitor II
July 12, 2016
Question

STM32F3DISCOVERY PWM

  • July 12, 2016
  • 1 reply
  • 693 views
Posted on July 12, 2016 at 15:54

Can i make a 2 PWM signals phased like this?

Phased like yellow and blue waves

0690X00000603N2QAI.jpg

#keil #stm32f3-discovery
This topic has been closed for replies.

1 reply

Walid FTITI_O
Visitor II
July 12, 2016
Posted on July 12, 2016 at 16:59

Hi ferreira.filipe,

Yes, you can do it easily on STM32. You should apply the center-aligned PWM mode (up/down counting) with a different signal polarity. You may want to enable the preload registers to get a synchronized change in duty cycle.

To more understand this Timer mode refer to this documents' sources:

-

http://www.st.com/content/ccc/resource/technical/document/reference_manual/4a/19/6e/18/9d/92/43/32/DM00043574.pdf/files/DM00043574.pdf/jcr:content/translations/en.DM00043574.pdf

: page 538: section ''PWM center-aligned mode (up/down counting)'' and p 519

-

http://www.st.com/content/ccc/resource/technical/document/application_note/54/0f/67/eb/47/34/45/40/DM00042534.pdf/files/DM00042534.pdf/jcr:content/translations/en.DM00042534.pdf

''STM32 cross-series timer overview'': from p 15 -> p18

In

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef3.html

library, you can refer to both ''TIM_Asymetric'' and ''TIM_combined'' examples which integrate the center_aligned mode ( see the AN4013 to identify the bit-fields which are activated to see the difference and make the asymetric or combined mode starting form center -aligned mode) . Examples are at this path : STM32Cube_FW_F3_V1.5.0\Projects\STM32F3-Discovery\Examples\TIM

-Hannibal-