Skip to main content
stst9187
Associate III
August 31, 2017
Question

I need 4 output with pwm feature. All pwm are the same period T of 200 Hz. All pwm have independent dc ( duty cycle ) and independent dt ( dead time ) . Is it possible configure the timer peripheral and the clock to have dead time configurable betwee

  • August 31, 2017
  • 2 replies
  • 2639 views
Posted on August 31, 2017 at 08:12

I need 4 output with pwm feature.

All pwm are the same period T of 200 Hz.

All pwm have independent dc ( duty cycle ) and independent dt ( dead time ) .

Is it possible configure the timer peripheral and the clock to have dead time configurable between 0 to T/2 ( half period )?

I'm using stm32f052 or stm32f072

thanks

Marco

    This topic has been closed for replies.

    2 replies

    Vangelis Fortounas
    Associate II
    August 31, 2017
    Posted on August 31, 2017 at 10:24

    Hello !

    Dead Time can not be adjusted independently for each channel.

    Dead time means at each PWM channel,  are exists two complementary outputs.

    Only Timer 1 and 8 have 3 channels with 2 complementary outputs per timer. The other timers don't have this functionality.

    Timer 8 is not available in your MCUs

    So ..   the answer is  no.

    Regards

    vf

    waclawek.jan
    Super User
    August 31, 2017
    Posted on August 31, 2017 at 10:40

    I'd go for 4 timers, all set to the same period; TRGO-TRGI linked to each other in daisly-chain fashion, TRGO always taken from an unused channel and determining the phase shift between two successive timers.

    JW

    stst9187
    stst9187Author
    Associate III
    August 31, 2017
    Posted on August 31, 2017 at 11:11

    Hi Jan

    sorry but I 'don't' understand, please tell me more thanks ..

    Robert Poor
    Associate III
    August 31, 2017
    Posted on August 31, 2017 at 19:46

    Frankly, if your PWM period is only 200 Hz and your system doesn't have other time critical processes, you can create software PWMs to do exactly what you need.  You didn't mention what resolution you need, but for 8 bit resolution, your inner loop only needs to run at 51.2Khz, which should be easy on a 48MHz part.

    If you do have other time critical processes, you can run them in lock step with the PWM routine.  I used this technique on a lowly PIC processor running at 4MHz to generate 3 PWM channels at 100 Hz, so four channels on a 48MHz part should be a piece of cake...