SlideShare a Scribd company logo
ePWM 101
wrt 0L_sensing.c
Submodules and Signal Connections for an
ePWM Module
Submodule Block Diagram
Time Base (TB) Submodule
● Has a dedicated 16-bit counter along with built-in synchronization logic to allow multiple
ePWM modules to work together as a single system.
● A clock prescaler divides the ePWM clock to the counter.
● A period register is used to control the frequency and period of the generated waveform.
● Counter operates in three modes-- up count, down count, and up/down count
● The up count and down count modes are used to generate asymmetrical waveforms.
● The up/down count mode is used to generate symmetrical waveforms.
Counter Compare (CC) Submodule
● Continuously compares the time-base count value to four counter compare registers--
Compare A, Compare B, Compare C, and Compare D
● Compare event is fed to the action qualifier and event trigger submodules
● All four compare registers can be used to start an ADC conversion or generate an ePWM
interrupt
● For the up count and down count modes, the count matches or occur only once per cycle.
● However, for the up/down count mode, a count match occurs twice per cycle, since there is a
match on the up count and down count.
Action Qualifier (AQ) Submodule
● Responsible for constructing and generating the switched PWM waveforms
● Utilizes match events from the time-base and counter compare submodules for
performing actions on the ePWMxA and ePWMxB output pins
● These actions are do nothing to the pin, clear the pin low, set the pin high, or toggle the
pin based independently on count up and count down time-base match events
● The match events are:
○ time based counter equals zero,
○ the time-base counter equals Compare A,
○ the time-base counter equals Compare B,
○ the time-base counter equals the period register value,
○ or a trigger event T1 and T2 based on a comparator, trip, or synchronization signal
Dead Band (DB) submodule
● Provides a classical approach for delaying the switching action of a power device
● Since power switching devices turn on faster than they turn off, a delay is needed to
prevent having a momentary short circuit path from supply rail to ground
● This submodule supports independently programmable rising edge and falling edge
delays with various options for generating the appropriate signal outputs on ePWMxA
and ePWMxB
PWM Chopper (PC) Submodule
● Modulates a high frequency carrier signal with the PWM waveform that is generated by
the action qualifier and dead band submodules
● Its purpose is to control the power switching elements used with pulse transformer-
based gate drivers.
● The high frequency carrier signal is logically ended with the ePWM outputs
● Programmable options are available to support the magnetic properties and
characteristics of the transformer and associated circuitry
Trip Zone (TZ) Submodule
● Provides a protection mechanism to protect the output pins from abnormalities, such as
overvoltage, overcurrent, and excessive temperature rise
● A fast clock-independent logic mechanism is utilized to quickly handle fault conditions by
forcing the ePWMxA and ePWMxB outputs to a safe state, such as high, low, or high
impedance
● The trip zone signals can be generated externally from any GPIO pin which is mapped
through the input cross-bar, internally from an eQEP error signal, system clock failure, or
emulation stop output from the CPU
● Numerous trip zone source signals can be generated from the digital compare submodule
Digital Compare (DC) Submodule
● Digital compare submodule expands the capabilities of the trip zone submodule by comparing
signals external to the ePWM module, such as a signal from the comparator subsystem analog
comparators, to directly generate PWM events or actions which are then used by the time-
base, event trigger, and trip zone submodules
● These compare events along with the submodules can generate PWM synchronization,
generate an ADC start of conversion, trip the output, or generate a trip interrupt.
● A compare event is generated when one or more of its inputs are either high or low. The signals
can originate from any external GPIO pin which is mapped through the input cross-bar and
from various internal peripherals which are mapped through the ePWM cross-bar.
Event Trigger (ET) Submodule
● Manages the events generated by the time-base, counter compare, and digital compare
submodules for generating an interrupt to the CPU and/or a start of conversion pulse to
the ADC when selected events occur.
● These event triggers can occur when the time-base counter equals
○ Zero,
○ Period,
○ Zero or period,
○ The up or down count match of a Compare A, B, C, or D register.
Code references
EPwm1Regs.TBCTL.bit.CLKDIV = 0;
● The value set to CLKDIV is 1
● TBCLK (Time Base Clock frequency)
= SYSCLKOUT (150 MHz) / 1 x HSPCLKDIV
EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1;
● HSPCLKDIV value set is 2
● Time Base Clock frequency is 150 / 2 x 1 = 75 MHz
EPwm2Regs.TBCTL.bit.CTRMODE = 2;
EPwm2Regs.AQCTLA.bit.CAU = AQ_CLEAR;
EPwm2Regs.AQCTLA.bit.CAD = AQ_SET;
EPwm1Regs.TBPRD = 3750;
● Time Base Period is set to 3750
● This was done in hindsight of the fact that the PWM frequency had to be set to 10KHz
● PWM period = 2 x TBPRD x TBCLK period
● Hence TBPRD for 10 KHz frequency = 75 M/ 2 x 10K = 3750
EPwm1Regs.DBRED = 0;
EPwm1Regs.DBFED = 0;
● Rising Edge delay = DBRED x TBCLK Period = 0
● Falling edge delay = DBFED x TBCLK period = 0
EPwm1Regs.DBCTL.bit.OUT_MODE = 3;
EPwm1Regs.DBCTL.bit.POLSEL = 2;
● Need to invert ePWMxB as it controls the complementary switch in a single leg of the
inverter.
● Closing of both switches in a leg will lead to a short circuit.
EPwm1Regs.DBCTL.bit.IN_MODE = 0;

More Related Content

PDF
Block codes
PPTX
Lecture5 teletraffic
PPTX
Wireless LAN technologies
PPTX
Convolutional codes
PPTX
Modbus communication protocol
PDF
Optimal control systems
PPTX
Unit 3-State-Space Analysis_all.pptx
PPTX
Switches and LEDs interface to the 8051 microcontroller
Block codes
Lecture5 teletraffic
Wireless LAN technologies
Convolutional codes
Modbus communication protocol
Optimal control systems
Unit 3-State-Space Analysis_all.pptx
Switches and LEDs interface to the 8051 microcontroller

What's hot (20)

PDF
Communication protocols - Embedded Systems
DOCX
Design and Simulation of Local Area Network Using Cisco Packet Tracer
PPTX
Modbus introduction
PPTX
Modbus protocol
PPT
transmission media
PPTX
Comparsion of M-Ary psk,fsk,qapsk.pptx
PDF
Mobile Communication
PPT
Error Detection And Correction
PDF
Session 6 sv_randomization
PPTX
CoAP - Web Protocol for IoT
PPTX
Transmission Impairment
PDF
8086 memory segmentation
PPTX
Topology,Switching and Routing
PPTX
MODULE-5_CCN.pptx
PDF
Analog To Digital Conversion (ADC) Programming in LPC2148
PPTX
domain specific iot system
PPTX
Introduction to Wireless Communication
PPTX
Framing in data link layer
Communication protocols - Embedded Systems
Design and Simulation of Local Area Network Using Cisco Packet Tracer
Modbus introduction
Modbus protocol
transmission media
Comparsion of M-Ary psk,fsk,qapsk.pptx
Mobile Communication
Error Detection And Correction
Session 6 sv_randomization
CoAP - Web Protocol for IoT
Transmission Impairment
8086 memory segmentation
Topology,Switching and Routing
MODULE-5_CCN.pptx
Analog To Digital Conversion (ADC) Programming in LPC2148
domain specific iot system
Introduction to Wireless Communication
Framing in data link layer
Ad

Similar to Enhanced phase width modulation in TMS320F28335D (20)

PPTX
U III embedded system MOTION CONTROL QEI.pptx
PDF
D. CHAPTER dffrtgfffffffgggfffdddFIVE.pdf
PPTX
Unit-III.pptx
PPTX
Timers and pwm
PDF
Interfacing Analog to Digital Data Converters ee3404.pdf
PPTX
Temperature Controller with Atmega16
PPT
chapter 4
PPT
Evolution of Programmable Logic Controllers
PPT
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
PPT
PLC PPT.ppt
PPT
PLC good.ppt
PPT
ie450pp10.ppt
PPT
ie450pp10.ppt
PPT
ie450pp10.ppt
PPT
PLC.ppt
PPT
ie450pp10.ppt
PPT
ie450pp10.ppt
PPT
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PPT
PLC (PROGRAMMABLE LOGIC CONTROLLER)
PPT
plc1.ppt
U III embedded system MOTION CONTROL QEI.pptx
D. CHAPTER dffrtgfffffffgggfffdddFIVE.pdf
Unit-III.pptx
Timers and pwm
Interfacing Analog to Digital Data Converters ee3404.pdf
Temperature Controller with Atmega16
chapter 4
Evolution of Programmable Logic Controllers
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
PLC PPT.ppt
PLC good.ppt
ie450pp10.ppt
ie450pp10.ppt
ie450pp10.ppt
PLC.ppt
ie450pp10.ppt
ie450pp10.ppt
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC (PROGRAMMABLE LOGIC CONTROLLER)
plc1.ppt
Ad

More from Satya Sahoo (10)

PPTX
An affordable 3d printed tracking system for low capacity PV applications
PPTX
Numerical Solution of the navier stokes equations using the finite difference...
PPTX
Flash Photography and toonification
PPTX
Frequency Control of Power Systems
PPTX
Carbon capture and storage
PPTX
Protection of inverter based microgrids
PPTX
Grounding in AC Microgrids
PPTX
Nigeria Emissions and Energy Policies
PDF
Nanoparticles in heat transfer applications
PPT
Energy Analysis of Nigeria
An affordable 3d printed tracking system for low capacity PV applications
Numerical Solution of the navier stokes equations using the finite difference...
Flash Photography and toonification
Frequency Control of Power Systems
Carbon capture and storage
Protection of inverter based microgrids
Grounding in AC Microgrids
Nigeria Emissions and Energy Policies
Nanoparticles in heat transfer applications
Energy Analysis of Nigeria

Recently uploaded (20)

PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Current and future trends in Computer Vision.pptx
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
Internet of Things (IOT) - A guide to understanding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Construction Project Organization Group 2.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
additive manufacturing of ss316l using mig welding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPT
introduction to datamining and warehousing
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
DOCX
573137875-Attendance-Management-System-original
PPT
Mechanical Engineering MATERIALS Selection
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Current and future trends in Computer Vision.pptx
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Sustainable Sites - Green Building Construction
Internet of Things (IOT) - A guide to understanding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Construction Project Organization Group 2.pptx
Geodesy 1.pptx...............................................
Lecture Notes Electrical Wiring System Components
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
additive manufacturing of ss316l using mig welding
Operating System & Kernel Study Guide-1 - converted.pdf
CH1 Production IntroductoryConcepts.pptx
introduction to datamining and warehousing
UNIT-1 - COAL BASED THERMAL POWER PLANTS
573137875-Attendance-Management-System-original
Mechanical Engineering MATERIALS Selection

Enhanced phase width modulation in TMS320F28335D

  • 2. Submodules and Signal Connections for an ePWM Module
  • 4. Time Base (TB) Submodule ● Has a dedicated 16-bit counter along with built-in synchronization logic to allow multiple ePWM modules to work together as a single system. ● A clock prescaler divides the ePWM clock to the counter. ● A period register is used to control the frequency and period of the generated waveform. ● Counter operates in three modes-- up count, down count, and up/down count ● The up count and down count modes are used to generate asymmetrical waveforms. ● The up/down count mode is used to generate symmetrical waveforms.
  • 5. Counter Compare (CC) Submodule ● Continuously compares the time-base count value to four counter compare registers-- Compare A, Compare B, Compare C, and Compare D ● Compare event is fed to the action qualifier and event trigger submodules ● All four compare registers can be used to start an ADC conversion or generate an ePWM interrupt ● For the up count and down count modes, the count matches or occur only once per cycle. ● However, for the up/down count mode, a count match occurs twice per cycle, since there is a match on the up count and down count.
  • 6. Action Qualifier (AQ) Submodule ● Responsible for constructing and generating the switched PWM waveforms ● Utilizes match events from the time-base and counter compare submodules for performing actions on the ePWMxA and ePWMxB output pins ● These actions are do nothing to the pin, clear the pin low, set the pin high, or toggle the pin based independently on count up and count down time-base match events ● The match events are: ○ time based counter equals zero, ○ the time-base counter equals Compare A, ○ the time-base counter equals Compare B, ○ the time-base counter equals the period register value, ○ or a trigger event T1 and T2 based on a comparator, trip, or synchronization signal
  • 7. Dead Band (DB) submodule ● Provides a classical approach for delaying the switching action of a power device ● Since power switching devices turn on faster than they turn off, a delay is needed to prevent having a momentary short circuit path from supply rail to ground ● This submodule supports independently programmable rising edge and falling edge delays with various options for generating the appropriate signal outputs on ePWMxA and ePWMxB
  • 8. PWM Chopper (PC) Submodule ● Modulates a high frequency carrier signal with the PWM waveform that is generated by the action qualifier and dead band submodules ● Its purpose is to control the power switching elements used with pulse transformer- based gate drivers. ● The high frequency carrier signal is logically ended with the ePWM outputs ● Programmable options are available to support the magnetic properties and characteristics of the transformer and associated circuitry
  • 9. Trip Zone (TZ) Submodule ● Provides a protection mechanism to protect the output pins from abnormalities, such as overvoltage, overcurrent, and excessive temperature rise ● A fast clock-independent logic mechanism is utilized to quickly handle fault conditions by forcing the ePWMxA and ePWMxB outputs to a safe state, such as high, low, or high impedance ● The trip zone signals can be generated externally from any GPIO pin which is mapped through the input cross-bar, internally from an eQEP error signal, system clock failure, or emulation stop output from the CPU ● Numerous trip zone source signals can be generated from the digital compare submodule
  • 10. Digital Compare (DC) Submodule ● Digital compare submodule expands the capabilities of the trip zone submodule by comparing signals external to the ePWM module, such as a signal from the comparator subsystem analog comparators, to directly generate PWM events or actions which are then used by the time- base, event trigger, and trip zone submodules ● These compare events along with the submodules can generate PWM synchronization, generate an ADC start of conversion, trip the output, or generate a trip interrupt. ● A compare event is generated when one or more of its inputs are either high or low. The signals can originate from any external GPIO pin which is mapped through the input cross-bar and from various internal peripherals which are mapped through the ePWM cross-bar.
  • 11. Event Trigger (ET) Submodule ● Manages the events generated by the time-base, counter compare, and digital compare submodules for generating an interrupt to the CPU and/or a start of conversion pulse to the ADC when selected events occur. ● These event triggers can occur when the time-base counter equals ○ Zero, ○ Period, ○ Zero or period, ○ The up or down count match of a Compare A, B, C, or D register.
  • 13. EPwm1Regs.TBCTL.bit.CLKDIV = 0; ● The value set to CLKDIV is 1 ● TBCLK (Time Base Clock frequency) = SYSCLKOUT (150 MHz) / 1 x HSPCLKDIV
  • 14. EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1; ● HSPCLKDIV value set is 2 ● Time Base Clock frequency is 150 / 2 x 1 = 75 MHz
  • 17. EPwm1Regs.TBPRD = 3750; ● Time Base Period is set to 3750 ● This was done in hindsight of the fact that the PWM frequency had to be set to 10KHz ● PWM period = 2 x TBPRD x TBCLK period ● Hence TBPRD for 10 KHz frequency = 75 M/ 2 x 10K = 3750 EPwm1Regs.DBRED = 0; EPwm1Regs.DBFED = 0; ● Rising Edge delay = DBRED x TBCLK Period = 0 ● Falling edge delay = DBFED x TBCLK period = 0
  • 19. EPwm1Regs.DBCTL.bit.POLSEL = 2; ● Need to invert ePWMxB as it controls the complementary switch in a single leg of the inverter. ● Closing of both switches in a leg will lead to a short circuit.