Register Mapping
846
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Enhanced Capture (eCAP) Module
Table 8-12. ECAP Interrupt Forcing Register (ECFRC) Field Descriptions (continued)
Bits
Field
Value
Description
5
CTROVF
Force Counter Overflow
0
No effect. Always reads back a 0.
1
Writing a 1 to this bit sets the CTROVF flag bit.
4
CEVT4
Force Capture Event 4
0
No effect. Always reads back a 0.
1
Writing a 1 sets the CEVT4 flag bit
3
CEVT3
Force Capture Event 3
0
No effect. Always reads back a 0.
1
Writing a 1 sets the CEVT3 flag bit
2
CEVT2
Force Capture Event 2
0
No effect. Always reads back a 0.
1
Writing a 1 sets the CEVT2 flag bit.
1
CEVT1
Force Capture Event 1
1
No effect. Always reads back a 0.
0
Sets the CEVT1 flag bit.
0
Reserved
0
Any writes to these bit(s) must always have a value of 0.
8.6
Register Mapping
shows the eCAP module control and status register set.
Table 8-13. Control and Status Register Set
Name
Offset
Size (x16)
Description
Time Base Module Registers
TSCTR
0x0000
2
Time-Stamp Counter
CTRPHS
0x0002
2
Counter Phase Offset Value Register
CAP1
0x0004
2
Capture 1 Register
CAP2
0x0006
2
Capture 2 Register
CAP3
0x0008
2
Capture 3 Register
CAP4
0x000A
2
Capture 4 Register
reserved
0x000C - 0x0013
8
ECCTL1
0x0014
1
Capture Control Register 1
ECCTL2
0x0015
1
Capture Control Register 2
ECEINT
0x0016
1
Capture Interrupt Enable Register
ECFLG
0x0017
1
Capture Interrupt Flag Register
ECCLR
0x0018
1
Capture Interrupt Clear Register
ECFRC
0x0019
1
Capture Interrupt Force Register
Reserved
0x001A - 0x001F
6
8.7
Application of the ECAP Module
The following sections will provide Applications examples and code snippets to show how to configure and
operate the eCAP module. For clarity and ease of use, the examples use the eCAP “C” header files.
Below are useful #defines which will help in the understanding of the examples.
// ECCTL1 (ECAP Control Reg 1)
//==========================