5.3.2.3.2 FALL Capture Events
When a FALL event occurs, the application code has access to full valid capture data for three pulse widths
(1.5 periods) in high-resolution capture mode and four pulse widths (2 full periods) in normal capture mode.
The application code has only until the next RISE event to read all relevant registers and clear the FALL event.
Otherwise, the data will be overwritten and invalid. Therefore FALL events are generally used to capture short
pulse widths spaced far enough apart to read the registers safely.
Note
Because HCCOUNTER starts counting immediately after SOFTRESET, the first FALL capture result
into HCCAPCNTFALL0 does not include valid pulse width data and should be discarded. By the next
FALL capture event, the invalid data in the “0” register has been transferred into HCCAPCNTFALL1.
Therefore the data in this register should also be discarded. After the second FALL interrupt, all
capture data is valid and can be used normally.
5.3.2.4 Normal Capture Mode
In normal capture mode, when a rise event (HCIFR[RISE]=1) or a fall event (HCIFR[FALL]=1) occurs, the
application code reads the HCCAPCNTRISE0/1 and HCCAPCNTFALL0/1 registers and does not require the
HCCal HRCAP calibration library. The resolution of the captured result will be accurate /- 1 SYSCLK
cycles (where SYSCLK is sourced by the same PLLCLK that generates HCCAPCLK – on this device, it is within
+/- 1 SYSCLK2 cycles).
High pulse widths are measured in number of HCCAPCLK cycles equal to 1 + HCCAPCNTFALL0 or 1 +
HCCAPCNTFALL1 as shown in
HCCAPCLK
HRCAPx
HCCOUNTER
m-1
m
0x0000
0x0001
0x0002
0x0003
0x0004
...
n-2
n-1
n
0x0000
HCCAPCNTFALL0/1 + 1
Figure 5-6. High Pulse Width Normal Mode Capture
Low pulse widths are measured in number of HCCAPCLK cycles equal to 1 + HCCAPCNTRISE0 or 1 +
HCCAPCNTRISE1 as shown in
HCCAPCLK
HRCAPx
HCCOUNTER
m-1
m
0x0000
0x0001
0x0002
0x0003
0x0004
...
n-2
n-1
n
0x0000
HCCAPCNTRISE0/1 + 1
Figure 5-7. Low Pulse Width Normal Mode Capture
In both cases, 1 is added to the value in the HCCAPCNT registers to account for the HCCAPCLK cycle in which
HCCOUNTER = 0.
High-Resolution Capture (HRCAP) Module
410
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......