ePWM Submodules
687
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Enhanced Pulse Width Modulator (ePWM) Module
7.2.2.5
Simultaneous Writes to TBPRD and CMPx Registers Between ePWM Modules
For variable frequency applications, there is a need for simultaneous writes of TBPRD and CMPx registers
between ePWM modules. This prevents situations where a CTR = 0 or CTR = PRD pulse forces a
shadow to active load of these registers before all registers are updated between ePWM modules
(resulting in some registers being loaded from new shadow values while others are loaded from old
shadow values). To support this, an ePWM register linking scheme for TBPRD:TBPRDHR,
CMPA:CMPAHR, CMPB:CMPBHR, CMPC, and CMPD registers between PWM modules has been
added.
For a particular ePWM module # A , user code writes “B+1”, to the linked register bit-field in EPWMXLINK.
“B” is the ePWM module # being linked to (i.e. Writes to the ePWM module “B” TBPRD:TBPRDHR,
CMPA:CMPAHR, CMPB:CMPBHR, or CMPC will simultaneously be written to corresponding register in
ePWM module “A”) For instance if ePWM3 EPWMXLINK register is configured so that CMPA:CMPAHR
are linked to ePWM1, then a write to CMPA:CMPAHR in ePWM 1 will simultaneously write the same
value to CMPA:CMPAHR in ePWM3. If ePWM4 also has its CMPA:CMPAHR registers linked to ePWM1,
then a write to ePWM 1 will write the same value to the CMPA:CMPAHR registers in both ePWM3 and
ePWM4.
The register description for EPWMXLINK clearly explains the linked register bit-field values for
corresponding ePWM.
NOTE:
ePWM register linking scheme works with the TBPRD:TBPRDHR [Mirrored instance],
CMPA:CMPAHR [Mirrored instance], CMPB:CMPBHR [Mirrored instance], CMPC, and
CMPD registers present in the upper page offset. Only the instance of these registers in
offsets 0x62-0x6B are linked between ePWM modules
A typical example snippet will use the following registers linked between modules
EPwmxRegs.TBPRDHRM2 , EPwmxRegs.CMPAM2 , EPwmxRegs.CMPBM ,
EPwmxRegs.CMPC , EPwmxRegs.CMPD
7.2.2.6
Time-base Counter Modes and Timing Waveforms
The time-base counter operates in one of four modes:
•
Up-count mode which is asymmetrical.
•
Down-count mode which is asymmetrical.
•
Up-down-count which is symmetrical
•
Frozen where the time-base counter is held constant at the current value
To illustrate the operation of the first three modes, the following timing diagrams show when events are
generated and how the time-base responds to an EPWMxSYNCI signal.