Several C28x based devices support high resolution pulse width modulation (HRPWM) and capture (HRCAP) along with enhanced PWM and capture modules. The calibration libraries for these can be found at /libraries/calibration location in C2000Ware installation.
HRPWM Calibration Library¶
The high resolution PWMs are recommended to be used when PWM resolution falls below ~9-10 bits. Although each application may differ, typical low frequency PWM operation (below 250 kHz) may not require HRPWM. HRPWM capability is most useful for high frequency PWM requirements of various power conversion topologies.
HRPWM is based on micro-edge positioner (MEP) technology. MEP logic is capable of positioning an edge very finely by sub-dividing one coarse system clock of a conventional PWM generator. The time step accuracy is on the order of 150 ps. See the device-specific data sheet for the typical MEP step size on a particular device.
The MEP step size varies based on worst-case process parameters, operating temperature, and voltage. The HRPWM calibration library consists of a self-check software diagnostics mode to check if the MEP logic is running optimally, under all operating conditions. Applications that use the HRPWM feature should use the TI-supplied MEP scale factor optimization (SFO) libraries. The SFO library helps to dynamically determine the number of MEP steps per EPWMCLK period while the HRPWM is in operation.
SFO library is available for both bit-field and Driverlib based code base. Refer to readme.txt available at /libraries/calibration/hrpwm/<device>/lib location for usage specific details.
HRCAP Calibration Library¶
The HRCAP calibration library is only required for devices which have type-0 HRCAP. Later versions of HRCAP include this calibration logic in hardware itself.
The HRCAP calibration (HCCal) logic is capable of capturing an edge in discrete time steps which subdivides an HRCAP clock cycle. The HRCAP step size is of the order of 300 ps and varies based on worst-case process parameters, operating temperature, and voltage. See device-specific data sheet for typical HRCAP step size on your device.
Applications that use the HRCAP type-0 in high-resolution capture mode should use the TI-supplied HRCAP calibration library to dynamically scale the HRCAP step size to a fraction of the HCCAPCLK cycle while the HRCAP is in high-resolution mode. The library also provides functions to measure the high resolution high pulse width, low pulse width, and period. Refer to device TRM for usage specific details.