When writing INTPRD values the following occur:
• Writing to the INTPRD bits will automatically clear the counter INTCNT = 0 and the counter output will be
reset (so no interrupts are generated).
• Writing an INTPRD value that is GREATER or equal to the current counter value will reset the INTCNT = 0.
• Writing an INTPRD value that is equal to the current counter value will trigger an interrupt if it is enabled and
the status flag is cleared (and INTCNT will also be cleared to 0)
• Writing an INTPRD value that is LESS than the current counter value will result in undefined behavior (that is,
INTCNT stops counting because INTPRD is below INTCNT, and interrupt will never fire).
• Writing a 1 to the ETFRC[INT] bit will increment the event counter INTCNT. The counter will behave as
described above when INTCNT = INTPRD.
• When INTPRD = 0, the counter is disabled and hence no events will be detected and the ETFRC[INT] bit is
also ignored.
The above definition means that you can generate an interrupt on every event, on every second event, or on
every third event. An interrupt cannot be generated on every fourth or more events.
Latch
Generate
Interrupt
Pulse
When
Input = 1
2-bit
Counter
Set
Clear
1
0
0
Clear CNT
Inc CNT
ETPS[INTCNT]
ETPS[INTPRD]
ETCLR[INT]
EPWMxINT
ETFRC[INT]
ETSEL[INT]
000
001
010
011
100
101
111
110
0
ETFLG[INT]
CTR=Zero
CTR=PRD
CTRU=CMPA
CTRD=CMPA
CTRU=CMPB
CTRD=CMPB
ETSEL[INTSEL]
Figure 3-42. Event-Trigger Interrupt Generator
Enhanced Pulse Width Modulator (ePWM) Module
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
295
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......