Up-Down-Count, Dual Edge Symmetric Waveform, With Independent Modulation On Epwmxa And Epwmxb - Active Low - Texas Instruments Concerto F28M36 Series Technical Reference Manual

Table of Contents

Advertisement

ePWM Submodules
Figure 7-27. Up-Down-Count, Dual Edge Symmetric Waveform, With Independent Modulation on
TBCTR
TBPRD
value
EPWMxA
EPWMxB
A
PWM period = 2 x TBPRD × T
B
Duty modulation for EPWMxA is set by CMPA, and is active low (that is, the low time duty is proportional to CMPA).
C
Duty modulation for EPWMxB is set by CMPB and is active low (that is, the low time duty is proportional to CMPB).
D
Outputs EPWMxA and EPWMxB can drive independent power switches
Example 7-4
contains a code sample showing initialization and run time for the waveforms in
Use the code in
Example 7-5
Example 7-4. Code Sample for
// Initialization Time
// = = = = = = = = = = = = = = = = = = = = = = = =
EPwm1Regs.TBPRD = 600;
EPwm1Regs.CMPA.half.CMPA = 400;
EPwm1Regs.CMPB = 500;
EPwm1Regs.TBPHS = 0;
EPwm1Regs.TBCTR = 0;
EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Symmetric
xEPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;
xEPwm1Regs.TBCTL.bit.PRDLD = TB_SHADOW;
EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_DISABLE;
EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1;
EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV1;
EPwm1Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;
EPwm1Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
EPwm1Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;
EPwm1Regs.AQCTLA.bit.CAU = AQ_SET;
EPwm1Regs.AQCTLA.bit.CAD = AQ_CLEAR;
EPwm1Regs.AQCTLB.bit.CBU = AQ_SET;
EPwm1Regs.AQCTLB.bit.CBD = AQ_CLEAR;
//
// Run Time
// = = = = = = = = = = = = = = = = = = = = = = = =
EPwm1Regs.CMPA.half.CMPA = Duty1A;
EPwm1Regs.CMPB = Duty1B;
710
C28 Enhanced Pulse Width Modulator (ePWM) Module
EPWMxA and EPWMxB — Active Low
CA
CA
CB
CB
CB
TBCLK
to define the headers.
Figure 7-27
// Period = 2´600 TBCLK counts
// Compare A = 400 TBCLK counts
// Compare B = 500 TBCLK counts
// Set Phase register to zero
// clear TB counter
// Phase loading disabled
// TBCLK = SYSCLKOUT
// load on CTR = Zero
// load on CTR = Zero
// adjust duty for output EPWM1A
// adjust duty for output EPWM1B
Copyright © 2012–2019, Texas Instruments Incorporated
CA
CB
SPRUHE8E – October 2012 – Revised November 2019
Submit Documentation Feedback
www.ti.com
CA
CB
Figure
7-27.

Advertisement

Table of Contents
loading

Table of Contents