CAT2 Peripheral Driver Library
Clock Calibration

Clock calibration allows measuring the number of clock cycles (counter 2) that occur within a time window. More...

Modules

 Functions
 
 Enumerated Types
 

Detailed Description

Clock calibration allows measuring the number of clock cycles (counter 2) that occur within a time window.

The time window is created by counting clock cycles of a reference clock (counter 1). It allows a programmable choice of the clock for both counter 1 and counter 2. This gives it the capability to more quickly calibrate a low-speed clock (eg. counter2 = clk_ilo) with a faster clock (counter1 = clk_imo).

These functions measure the frequency of a specified clock relative to a reference clock. They are typically called in the following order:

  1. Specify the measured clock, the count, and the reference clock
  2. Start the counters
  3. Wait for the measurement counter to finish counting
  4. Retrieve the measured frequency
Note
These functions may also be used as part of a clock trimming process. Refer to the Clock Trim API.