www.ti.com

Time-Base (TB) Submodule

Figure 2-3. Time-Base Frequency and Period

TPWM

4

3

2

1

0

1

0

2

3

 

 

PRD

4

4

 

 

3

 

 

 

 

2

Z1

0

For Up Count and Down Count

TPWM

4

3

2

1

0

4

3

PRD 4

3

2

1

0

2

1 Z

0

TPWM = (TBPRD + 1) x TTBCLK FPWM = 1/ (TPWM)

 

 

TPWM

 

 

 

 

 

 

TPWM

 

 

 

4

 

 

 

4

 

 

 

3

 

3

 

 

3

 

3

 

 

 

 

 

 

 

 

2

 

 

 

2

 

2

 

 

 

2

 

1

 

 

 

 

 

1

1

 

 

 

 

 

1

0

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For Up and Down Count

TPWM = 2 x TBPRD x TTBCLK

FPWM = 1 / (TPWM)

0

CTR_dir

Up

Down

Up

Down

2.2.3.1Time-Base Period Shadow Register

The time-base period register (TBPRD) has a shadow register. Shadowing allows the register update to be synchronized with the hardware. The following definitions are used to describe all shadow registers in the ePWM module:

Active Register

The active register controls the hardware and is responsible for actions that the hardware causes or invokes.

Shadow Register

The shadow register buffers or provides a temporary holding location for the active register. It has no direct effect on any control hardware. At a strategic point in time the shadow register's content is transferred to the active register. This prevents corruption or spurious operation due to the register being asynchronously modified by software.

The memory address of the shadow period register is the same as the active register. Which register is written to or read from is determined by the TBCTL[PRDLD] bit. This bit enables and disables the TBPRD shadow register as follows:

Time-Base Period Shadow Mode:

The TBPRD shadow register is enabled when TBCTL[PRDLD] = 0. Reads from and writes to the

TBPRD memory address go to the shadow register. The shadow register contents are transferred to the active register (TBPRD (Active) TBPRD (shadow)) when the time-base counter equals zero (TBCTR = 0x0000). By default the TBPRD shadow register is enabled.

Time-Base Period Immediate Load Mode:

If immediate load mode is selected (TBCTL[PRDLD] = 1), then a read from or a write to the TBPRD memory address goes directly to the active register.

26

ePWM Submodules

SPRU791D–November 2004–Revised October 2007

Submit Documentation Feedback

Page 26
Image 26
Texas Instruments TMS320x28xx, 28xxx manual Time-Base Period Shadow Register, ∙ Active Register, ∙ Shadow Register