PLL2
SYSCLK2
Divider
(A)
1
0
HCCTL[HCCAPCLKSEL]
PLL2CLK
SYSCLKOUT
HCCAPCLK
(A)
A.
On this device, the clock divider is a default value of of /2 when DEVICECNF[SYSCLK2DIV2DIS] =0.
Figure 5-3. HCCAPCLK Generation
5.3.2 HRCAP Modes of Operation
The HRCAP module has two modes of operation:
•
Normal capture mode:
The HRCAP module captures pulse widths in normal resolution /- 1 SYSCLK
(where SYSCLK is sourced from the same PLL output clock that sources HCCAPCLK — on this device, this
is SYSCLK2). This mode requires less software overhead than high-resolution capture mode.
•
High-resolution capture mode:
The HRCAP module captures pulse widths with the resolution of each edge
captured /- 300 ps typical and requires the usage of the HCCal calibration library provided by Texas
Instruments. In this mode, one HRCAP channel and the ePWM module connected to the HRCAP calibration
input must be dedicated to HRCAP calibration and are not functionally available to the application during
calibration.
5.3.2.1 HRCAP Counter
Both modes of operation utilize HCCOUNTER, which resets to 0 and starts counting HCCAPCLK cycles again
under the following conditions:
• SOFTRESET
• Detection of rising edge
• Detection of falling edge
• Device reset and reenable of HRCAP clock
When a rising edge is detected, the value in HCCOUNTER is captured into the 16-bit HCCAPCNTRISE0
register before the counter resets to 0. When a falling edge is detected, the value in HCCOUNTER is captured
into the 16-bit HCCAPCNTFALL0 register before the counter resets to 0. Because the HCCOUNTER starts
counting at 0 after an edge is detected, the actual low and high pulse widths (non-high-resolution) are
HCCAPCN 1 and HCCAPCN 1, respectively, where the “+1” is added to account for the
“0” HCCAPCLK cycle. This behavior is illustrated for high pulse width capture in
.
HCCAPCLK
HRCAPx
HCCOUNTER
m-1
m
0x0000
0x0001
0x0002
0x0003
0x0004
...
n-2
n-1
n
0x0000
HCCAPCN 1
Figure 5-4. HCCOUNTER Behavior During High Pulse Width Capture
High-Resolution Capture (HRCAP) Module
408
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......