01.08.2013 Views

Chapter 15 Pulse-Width Modulation Subsystem (PWMSS).

Chapter 15 Pulse-Width Modulation Subsystem (PWMSS).

Chapter 15 Pulse-Width Modulation Subsystem (PWMSS).

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Enhanced PWM (ePWM) Module www.ti.com<br />

Each ePWM module can be configured to use or ignore the synchronization input. If the TBCTL[PHSEN]<br />

bit is set, then the time-base counter (TBCNT) of the ePWM module will be automatically loaded with the<br />

phase register (TBPHS) contents when one of the following conditions occur:<br />

• EPWMxSYNCI: Synchronization Input <strong>Pulse</strong>: The value of the phase register is loaded into the<br />

counter register when an input synchronization pulse is detected (TBPHS → TBCNT). This operation<br />

occurs on the next valid time-base clock (TBCLK) edge.<br />

• Software Forced Synchronization <strong>Pulse</strong>: Writing a 1 to the TBCTL[SWFSYNC] control bit invokes a<br />

software forced synchronization. This pulse is ORed with the synchronization input signal, and<br />

therefore has the same effect as a pulse on EPWMxSYNCI.<br />

This feature enables the ePWM module to be automatically synchronized to the time base of another<br />

ePWM module. Lead or lag phase control can be added to the waveforms generated by different ePWM<br />

modules to synchronize them. In up-down-count mode, the TBCTL[PSHDIR] bit configures the direction of<br />

the time-base counter immediately after a synchronization event. The new direction is independent of the<br />

direction prior to the synchronization event. The TBPHS bit is ignored in count-up or count-down modes.<br />

See Figure <strong>15</strong>-13 through Figure <strong>15</strong>-16 for examples.<br />

Clearing the TBCTL[PHSEN] bit configures the ePWM to ignore the synchronization input pulse. The<br />

synchronization pulse can still be allowed to flow-through to the EPWMxSYNCO and be used to<br />

synchronize other ePWM modules. In this way, you can set up a master time-base (for example, ePWM1)<br />

and downstream modules (ePWM2 - ePWMx) may elect to run in synchronization with the master.<br />

<strong>15</strong>.2.2.3.4 Phase Locking the Time-Base Clocks of Multiple ePWM Modules<br />

The TBCLKEN bit in the <strong>PWMSS</strong>_CTRL register in the Control Module can be used to globally<br />

synchronize the time-base clocks of all enabled ePWM modules on a device. The TBCLKEN bit is part of<br />

the chip configuration registers and is described in <strong>Chapter</strong> 9. When TBCLKEN = 0, the time-base clock of<br />

all ePWM modules is stopped (default). When TBCLKEN = 1, all ePWM time-base clocks are started with<br />

the rising edge of TBCLK aligned. For perfectly synchronized TBCLKs, the prescaler bits in the TBCTL<br />

register of each ePWM module must be set identically. The proper procedure for enabling the ePWM<br />

clocks is as follows:<br />

1. Enable the ePWM module clocks.<br />

2. Set TBCLKEN = 0. This will stop the time-base clock within any enabled ePWM module.<br />

3. Configure the prescaler values and desired ePWM modes.<br />

4. Set TBCLKEN = 1.<br />

<strong>15</strong>.2.2.3.5 Time-Base Counter Modes and Timing Waveforms<br />

The time-base counter operates in one of four modes:<br />

• Up-count mode which is asymmetrical.<br />

• Down-count mode which is asymmetrical.<br />

• Up-down-count which is symmetrical.<br />

• Frozen where the time-base counter is held constant at the current value.<br />

To illustrate the operation of the first three modes, Figure <strong>15</strong>-13 to Figure <strong>15</strong>-16 show when events are<br />

generated and how the time-base responds to an EPWMxSYNCI signal.<br />

1636 <strong>Pulse</strong>-<strong>Width</strong> <strong>Modulation</strong> <strong>Subsystem</strong> (<strong>PWMSS</strong>) SPRUH73E–October 2011–Revised May 2012<br />

Submit Documentation Feedback<br />

Copyright © 2011–2012, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!