3.4.8.10 Digital Compare Counter Capture (DCCAP) Register
Figure 3-116. Digital Compare Counter Capture (DCCAP) Register
15
0
DCCAP
R-0
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 3-65. Digital Compare Counter Capture (DCCAP) Register Field Descriptions
Bit
Field
Value
Description
15-0
DCCAP
0000-FFFFh
Digital Compare Time-Base Counter Capture
To enable time-base counter capture, set the DCCAPCLT[CAPE] bit to 1.
If enabled, reflects the value of the time-base counter (TBCTR) on the low to high edge transition
of a filtered (DCEVTFLT) event. Further capture events are ignored until the next period or zero
as selected by the DCFCTL[PULSESEL] bit.
Shadowing of DCCAP is enabled and disabled by the DCCAPCTL[SHDWMODE] bit. By default
this register is shadowed.
•
If DCCAPCTL[SHDWMODE] = 0, then the shadow is enabled. In this mode, the active
register is copied to the shadow register on the TBCTR = TBPRD or TBCTR = zero as
defined by the DCFCTL[PULSESEL] bit. CPU reads of this register will return the shadow
register value.
•
If DCCAPCTL[SHDWMODE] = 1, then the shadow register is disabled. In this mode, CPU
reads will return the active register value.
The active and shadow registers share the same memory map address.
3.4.9 Proper Interrupt Initialization Procedure
When the ePWM peripheral clock is enabled it may be possible that interrupt flags may be set due to spurious
events due to the ePWM registers not being properly initialized. The proper procedure for initializing the ePWM
peripheral is as follows:
1. Disable global interrupts (CPU INTM flag)
2. Disable ePWM interrupts
3. Set TBCLKSYNC=0
4. Initialize peripheral registers
5. Set TBCLKSYNC=1
6. Clear any spurious ePWM flags (including PIEIFR)
7. Enable ePWM interrupts
8. Enable global interrupts
Enhanced Pulse Width Modulator (ePWM) Module
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
375
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......