Skip to main content
dylan
Associate II
May 17, 2017
Question

Double Edge PWM: STM32F4 & CubeMX

  • May 17, 2017
  • 8 replies
  • 1897 views
Posted on May 17, 2017 at 11:16

Hi All,

I would like to set my STM32F4 Nucleo to do double edge PWM, but for the life of me I cannot figure out how to do it. More specifically I am trying to do it on three channels of TIM1. To put it visually, I am trying to do something like this:

0690X00000606rzQAA.png

Thanks for you time.

Dylan

    This topic has been closed for replies.

    8 replies

    Nesrine M_O
    Associate
    May 17, 2017
    dylan
    dylanAuthor
    Associate II
    May 17, 2017
    Posted on May 17, 2017 at 12:15

    Hi

    ELMHIRI.Syrine

    ,

    Thank you for the response. I have had a look at the cook book but it is gibberish to me, I find it very difficult to follow. Perhaps you could refer me to the section that would aid me?

    Thanks,

    Dylan

    Uwe Bonnes
    Chief
    May 17, 2017
    Posted on May 17, 2017 at 22:07

    You can't do this with a single  channel of some TIMer. Maybe a HRTIM channel can do that. Or you use 2 channels and connect both channels logical.

    dylan
    dylanAuthor
    Associate II
    May 17, 2017
    Posted on May 17, 2017 at 23:15

    Hi

    Bonnes.Uwe

    ‌,

    Thanks for the response. Yes, my progress today has shown that you are right. For starters, this is not possible with the STM32F4 as it does not incorporate the new timer features of newer micros. The STM32L4 timers do have this features and so I have migrated to one of these. I am still working out how to use it, but at least I know it is there. This is documented in AN4013: STM32 Cross-Series Timers Overview.

    Thanks,

    Dylan

    waclawek.jan
    Super User
    May 17, 2017
    Posted on May 17, 2017 at 23:25

     This is documented in AN4013: STM32 Cross-Series Timers Overview.

    Nice catch.

    JW

    waclawek.jan
    Super User
    May 17, 2017
    Posted on May 17, 2017 at 22:11

    https://community.st.com/0D70X000006ShHUSA0