- ePWM Module Signals and Connections
- ePWM Block Diagram
- ePWM Time-Base Sub-Module
- ePWM Compare Sub-Module
- ePWM Action Qualifier Sub-Module
- ePWM Dead-Band Sub-Module
- ePWM Chopper Sub-Module
- ePWM Trip-Zone and Digital Compare Sub-Module
- ePWM Event-Trigger Sub-Module
- Hi-Resolution PWM (HRPWM)
- Example: ePWM1A
ePWM Module Signals and Connections

ePWM Block Diagram

ePWM Time-Base Sub-Module


ePWM Compare Sub-Module

ePWM Action Qualifier Sub-Module





ePWM Dead-Band Sub-Module


ePWM Chopper Sub-Module
Purpose of the PWM Chopper
- Allows a high frequency carrier signal to modulate the PWM waveform generated by the Action Qualifier and Dead-Band modules
- Used with pulse transformer-based gate drivers to control power switching elements

ePWM Trip-Zone and Digital Compare Sub-Module




Purpose of the Digital Compare Sub-Module
-
Generates compare events that can:
- Trip the ePWM
- Generate a Trip interrupt
- Sync the ePWM
- Generate an ADC start of conversion
-
Digital compare module inputs are:
- Input X-Bar
- ePWM X-Bar
- Trip-zone input pins
- A compare event is generated when one or more of its selected inputs are either high or low
- Optional Blanking can be used to temporarily disable the compare action in alignment with PWM switching to eliminate noise effects


ePWM Event-Trigger Sub-Module

Hi-Resolution PWM (HRPWM)

Example: ePWM1A
void init_EPWM1A_GPIO(void)
{
EALLOW;
GpioCtrlRegs.GPAPUD.bit.GPIO0 = 1; // Disable pull-up on GPIO0 (EPWM1A)
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // Configure GPIO0 as EPWM1A
EDIS;
}
// Configures ePWM1A to generate a 20 kHz PWM carrier signal
void init_EPWM1A(void)
{
// Set epwm1 to upcount mode, 0x0
EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP;
// Free Run, do not stop
EPwm1Regs.TBCTL.bit.FREE_SOFT = 0x2;
// Disable phase loading, 0x0
EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;
// Set epwm1 counter 20KHz, set timer period
// 50MHz / 20KHz = 2500
EPwm1Regs.TBPRD = 2500;
EPwm1Regs.TBPHS.bit.TBPHS = 0x0000; // Phase is 0
EPwm1Regs.TBCTR = 0x0000; // Clear counter
// For EPWM1A
EPwm1Regs.AQCTLA.bit.CAU = AQ_CLEAR; // Clear when counter = compareA
EPwm1Regs.AQCTLA.bit.ZRO = AQ_SET; // Set when timer is 0
}
// 0: 0% duty cycle, 2500: 100% duty cycle
EPwm1Regs.CMPA.bit.CMPA = (Uint16)pwmVal;
Reference
Back to top of the page