C2000: ePWM up, down, up-and-down count mode

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

This wiki article discusses how to decide if to ePWM up, down, or up-and-down mode considering an ePWM/HRPWM module such as that on 2803x/2802x/2806x.

General Guidelines

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.
    • 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.
    • For up or down count modes, without high resolution period: A loss of 3 system clock duty cycle steps in one PWM period.
    • For up count mode, with high-resolution period: A loss of 6 system clock duty steps.
    • 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.



C2000 ePWM and HRPWM Types

The C2000 Real-Time Control Peripherals Reference Guide (SPRU566) has a detailed summary of the different "types" of ePWM and HRPWM modules found on C28x devices and lists the associated reference manual for each. In this context a type change represents a functional feature difference in a peripheral module. Within a peripheral type, there may be minor differences between devices that do not affect the basic functionality of the module. These device-specific differences, if any, are also documented in SPRU566.

By knowing the peripheral "type" (i.e. type 0, type 1...) the user can determine which devices have which feature based ePWM and HRPWM.