Following are the HRCAP initialization
sequence steps. When using the HRCAP to take relative-time measurements, only steps
1-5 are required. When using the HRCAP to take time-converted measurements, all
steps are required.
- Enable HRCLK using HRCAP_enableHighResolutionClock()
- Delay 1µs
- Enable HR mode using HRCAP_enableHighResolution()
- Delay 1µs
- Configure the eCAP module as desired, including interrupts
- Set calibration period using HRCAP_setCalibrationPeriod()
- Enable continuous calibration using HRCAP_setCalibrationMode()
- Enable interrupts using HRCAP_enableCalibrationInterrupt()
- Start calibration using HRCAP_startCalibration()