![background image](http://html1.mh-extra.com/html/texas-instruments/tms320x2823x/tms320x2823x_reference-manual_1095205065.webp)
PIE
Event Trigger
Module Logic
CTR=Zero
CTR=PRD
CTR=CMPA
EPWMxINTn
CTR=CMPB
CTR_dir
Direction
qualifier
CTRU=CMPA
ETSEL reg
EPWMxSOCA
/n
/n
/n
EPWMxSOCB
ADC
clear
count
count
clear
count
clear
CTRD=CMPA
CTRU=CMPB
CTRD=CMPB
ETPS reg
ETFLG reg
ETCLR reg
ETFRC reg
www.ti.com
ePWM Submodules
•
Every second event
•
Every third event
Figure 43. Event-Trigger Submodule Showing Event Inputs and Prescaled Outputs
The key registers used to configure the event-trigger submodule are shown in
:
Table 20. Event-Trigger Submodule Registers
Register Name
Address offset
Shadowed
Description
ETSEL
0x0019
No
Event-trigger Selection Register
ETPS
0x001A
No
Event-trigger Prescale Register
ETFLG
0x001B
No
Event-trigger Flag Register
ETCLR
0x001C
No
Event-trigger Clear Register
ETFRC
0x001D
No
Event-trigger Force Register
•
ETSEL—This selects which of the possible events will trigger an interrupt or start an ADC conversion
•
ETPS—This programs the event prescaling options mentioned above.
•
ETFLG—These are flag bits indicating status of the selected and prescaled events.
•
ETCLR—These bits allow you to clear the flag bits in the ETFLG register via software.
•
ETFRC—These bits allow software forcing of an event. Useful for debugging or s/w intervention.
A more detailed look at how the various register bits interact with the Interrupt and ADC start of
conversion logic are shown in
,
, and
.
shows the event-trigger's interrupt generation logic. The interrupt-period (ETPS[INTPRD]) bits
specify the number of events required to cause an interrupt pulse to be generated. The choices available
are:
•
Do not generate an interrupt.
•
Generate an interrupt on every event
•
Generate an interrupt on every second event
•
Generate an interrupt on every third event
Which event can cause an interrupt is configured by the interrupt selection (ETSEL[INTSEL]) bits. The
event can be one of the following:
•
Time-base counter equal to zero (TBCTR = 0x0000).
•
Time-base counter equal to period (TBCTR = TBPRD).
•
Time-base counter equal to the compare A register (CMPA) when the timer is incrementing.
•
Time-base counter equal to the compare A register (CMPA) when the timer is decrementing.
65
SPRUG04A – October 2008 – Revised July 2009
TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module
© 2008–2009, Texas Instruments Incorporated