3.2.8.2 Controlling and Monitoring the Event-Trigger Submodule
The key registers used to configure the event-trigger submodule are shown in
Table 3-19. Event-Trigger Submodule Registers
Register
Address Offset
Shadowed
Description
Bit 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.
3.2.8.3 Operational Highlights for the Event-Trigger Submodule
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 zero or period (TBCTR = 0x0000 || 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.
• Time-base counter equal to the compare B register (CMPB) when the timer is incrementing.
• Time-base counter equal to the compare B register (CMPB) when the timer is decrementing.
The number of events that have occurred can be read from the interrupt event counter (ETPS[INTCNT]) register
bits. That is, when the specified event occurs the ETPS[INTCNT] bits are incremented until they reach the value
specified by ETPS[INTPRD]. When ETPS[INTCNT] = ETPS[INTPRD] the counter stops counting and its output
is set. The counter is only cleared when an interrupt is sent to the PIE.
When ETPS[INTCNT] reaches ETPS[INTPRD] the following behaviors will occur:
• If interrupts are enabled, ETSEL[INTEN] = 1 and the interrupt flag is clear, ETFLG[INT] = 0, then an
interrupt pulse is generated and the interrupt flag is set, ETFLG[INT] = 1, and the event counter is cleared
ETPS[INTCNT] = 0. The counter will begin counting events again.
• If interrupts are disabled, ETSEL[INTEN] = 0, or the interrupt flag is set, ETFLG[INT] = 1, the counter stops
counting events when it reaches the period value ETPS[INTCNT] = ETPS[INTPRD].
• If interrupts are enabled, but the interrupt flag is already set, then the counter will hold its output high until the
ETFLG[INT] flag is cleared. This allows for one interrupt to be pending while one is serviced.
Enhanced Pulse Width Modulator (ePWM) Module
294
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......