Capture Module - Control and Status Registers
806
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Enhanced Capture (eCAP) Module
Figure 8-19. ECAP Interrupt Enable Register (ECEINT)
15
8
Reserved
7
6
5
4
3
2
1
0
CTR=CMP
CTR=PRD
CTROVF
CEVT4
CEVT3
CEVT2
CETV1
Reserved
R/W
R/W
R/W
R/W
R/W
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 8-9. ECAP Interrupt Enable Register (ECEINT) Field Descriptions
Bits
Field
Value
Description
15:8
Reserved
7
CTR=CMP
Counter Equal Compare Interrupt Enable
0
Disable Compare Equal as an Interrupt source
1
Enable Compare Equal as an Interrupt source
6
CTR=PRD
Counter Equal Period Interrupt Enable
0
Disable Period Equal as an Interrupt source
1
Enable Period Equal as an Interrupt source
5
CTROVF
Counter Overflow Interrupt Enable
0
Disabled counter Overflow as an Interrupt source
1
Enable counter Overflow as an Interrupt source
4
CEVT4
Capture Event 4 Interrupt Enable
0
Disable Capture Event 4 as an Interrupt source
1
Capture Event 4 Interrupt Enable
3
CEVT3
Capture Event 3 Interrupt Enable
0
Disable Capture Event 3 as an Interrupt source
1
Enable Capture Event 3 as an Interrupt source
2
CEVT2
Capture Event 2 Interrupt Enable
0
Disable Capture Event 2 as an Interrupt source
1
Enable Capture Event 2 as an Interrupt source
1
CEVT1
Capture Event 1 Interrupt Enable
0
Disable Capture Event 1 as an Interrupt source
1
Enable Capture Event 1 as an Interrupt source
0
Reserved
The interrupt enable bits (CEVT1, ...) block any of the selected events from generating an interrupt.
Events will still be latched into the flag bit (ECFLG register) and can be forced/cleared via the
ECFRC/ECCLR registers.
The proper procedure for configuring peripheral modes and interrupts is as follows:
•
Disable global interrupts
•
Stop eCAP counter
•
Disable eCAP interrupts
•
Configure peripheral registers
•
Clear spurious eCAP interrupt flags
•
Enable eCAP interrupts
•
Start eCAP counter
•
Enable global interrupts