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.

[FAQ] ePWM: Choosing up-down, or up-and-down mode

How do I choose whether to use up-down or up-and-down mode for the ePWM module?

  • The following are some general guidelines. There are likely many other choices that one can make for a particular power stage/application that may provide benefits to that particular use case.

    1. Up and down count PWM operations give 2x the number of cycle counts than up-down count operation at the same PWM frequency.
      1. This means you can achieve higher resolution.

    2. Symmetric (up-down count) PWM methods are often used when low harmonic distortion is desired.
    3. HRPWM (High-Resolution PWM) operation on C2000 devices imposes some duty cycle value restrictions.
      1. For up or down count modes, without high resolution period: A loss of 3 system clock duty cycle steps in one PWM period.
      2. For up count mode, with high-resolution period: A loss of 6 system clock duty steps.
      3. For up-down count mode, with high-resolution period: A loss of 12 system clock duty cycle steps.
    4. If HRPWM period control is desired, only up-count or up-down count mode may be used. Down-count mode is not supported.
    5. When phase shift between PWMs is the controlled parameter, having PWMs configured in asymmetric mode is typically easier to handle than symmetric mode. This is because when phase shift is greater 180 deg, it necessitates the synchronized PWM to be configured to count in the other direction on a sync event than how it was configured for phase shift < 180 deg. This must be handled by software.
    6. If a constant 50 % duty cycle is desired, it is easier to use up-down count mode and have action qualifier events configured at CTR = 0 and PRD. If high-resolution period control is desired, this action qualifier configuration is not recommended.
  • Thanks Lori! Very helpful.