5.4 HRCAP Calibration Library
The HRCAP calibration (HCCal) logic is capable of capturing an edge in discrete time steps which subdivide
an HCCAPCLK cycle. As previously mentioned, the size of each step is on the order of 300 ps (see device-
specific data sheet for typical HRCAP step size on your device). The HRCAP_Cal() function in the HRCAP
calibration library must be run periodically to be certain that time steps are optimally applied and that the edge
capture accuracy is maintained over a wide range of PWM frequencies, system clock frequencies, voltages, and
temperatures. The HRCAP step size varies based on worst-case process parameters, operating temperature,
and voltage. HRCAP step size increases with decreasing voltage and increasing temperature and decreases
with increasing voltage and decreasing temperature.
Applications that use the HRCAP in high-resolution capture mode should use the TI-supplied HRCAP calibration
(HCCal) software HRCAP_Cal() function. The HRCAP_Cal function helps to dynamically scale the HRCAP
step size to a fraction of the HCCAPCLK cycle while the HRCAP is in high-resolution mode. To utilize the
HCCal capabilities effectively during HRCAP operation, the HRCAP calibration logic uses built-in self-check and
diagnostics capabilities to scale the HRCAP step size appropriately for any operating condition.
TI provides a C-callable library containing one HRCAP calibration function that utilizes this hardware and
properly calibrates the internal HRCAP step logic as a fraction of a HCCAPCLK cycle. The library supplies
additional high-resolution capture functions to calculate pulse widths captured in Q16 i fractional
HCCAPCLK cycles based on the values in the HCCAPCNT registers and the calibration results.
The contents of these functions are proprietary to Texas Instruments and will not be published.
Currently, there is 1 released version of the HCCal Type 0 library, HCCal_Type0_V1.lib, which is located in the
C2000ware software package under the \libraries\calibration\hrcap\ directory.
High-Resolution Capture (HRCAP) Module
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
413
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......