This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28335: Enhanced PWM complementary mode first pulse

Part Number: TMS320F28335

Dear TI support,

I am using TMS320F28335 device. I use Enhanced PWM module in up/down count, complementary mode to drive a three phase motor. When I set EPWM module in complementary mode, first pulse always comes out at 100% duty cycle even though I programmed counter compare registers with approximately 50% duty cycle. After the first cycle everything looks correct, duty cycles on A and B channels are correct. I noticed PWM is initialized with shadow mode enabled. I disabled it and set it to immediate mode (CMPCTL register), however the problem is still there.  Do you have any suggestions?

Thanks for your support,

Felix V.

  • Hi Felix,

    Could you send a snippet of your initializations? It'd be helpful if I can see the order of startup and configuring the PWMs as well as what the configurations are.

    When are you starting your PWM timers? Typically, the flow we recommend is first disable your PWM clock, then complete all of your configurations, then enable/start the PWM counters. This means when your PWM starts, then your values are all already loaded and used in the very first cycle. In the past, I have seen some init cases cause undesired startup outputs depending on user configuration such as this.

    Best Regards,

    Allison