Synergy Software Package User's Manual

Interface for clock frequency accuracy measurements. More...

Data Structures

struct  cac_ref_clock_config_t
 
struct  cac_meas_clock_config_t
 
struct  cac_callback_args_t
 
struct  cac_cfg_t
 
struct  cac_api_t
 
struct  cac_instance_t
 

Typedefs

typedef void cac_ctrl_t
 

Enumerations

enum  cac_event_t { CAC_EVENT_FREQUENCY_ERROR, CAC_EVENT_MEASUREMENT_COMPLETE, CAC_EVENT_COUNTER_OVERFLOW }
 
enum  cac_clock_type_t { CAC_CLOCK_MEASURED, CAC_CLOCK_REFERENCE }
 
enum  cac_clock_source_t {
  CAC_CLOCK_SOURCE_MAIN_OSC = 0x00, CAC_CLOCK_SOURCE_SUBCLOCK = 0x01, CAC_CLOCK_SOURCE_HOCO = 0x02, CAC_CLOCK_SOURCE_MOCO = 0x03,
  CAC_CLOCK_SOURCE_LOCO = 0x04, CAC_CLOCK_SOURCE_PCLKB = 0x05, CAC_CLOCK_SOURCE_IWDT = 0x06, CAC_CLOCK_SOURCE_MEAS_MAX = CAC_CLOCK_SOURCE_IWDT,
  CAC_CLOCK_SOURCE_EXTERNAL = 0x07, CAC_CLOCK_SOURCE_REF_MAX = CAC_CLOCK_SOURCE_EXTERNAL
}
 
enum  cac_ref_divider_t { CAC_REF_DIV_32 = 0x00, CAC_REF_DIV_128 = 0x01, CAC_REF_DIV_1024 = 0x02, CAC_REF_DIV_8192 = 0x03 }
 
enum  cac_ref_digfilter_t { CAC_REF_DIGITAL_FILTER_OFF = 0x00, CAC_REF_DIGITAL_FILTER_1 = 0x01, CAC_REF_DIGITAL_FILTER_4 = 0x02, CAC_REF_DIGITAL_FILTER_16 = 0x03 }
 
enum  cac_ref_edge_t { CAC_REF_EDGE_RISE = 0x00, CAC_REF_EDGE_FALL = 0x01, CAC_REF_EDGE_BOTH = 0x02 }
 
enum  cac_meas_divider_t { CAC_MEAS_DIV_1 = 0x00, CAC_MEAS_DIV_4 = 0x01, CAC_MEAS_DIV_8 = 0x02, CAC_MEAS_DIV_32 = 0x03 }
 

Detailed Description

Interface for clock frequency accuracy measurements.

Register definitions, common services and error codes.

Summary

The interface for the clock frequency accuracy measurement circuit (CAC) peripheral is used to check a system clock frequency with a reference clock signal by counting the number of pulses of the clock (system clock) to be measured.

Related SSP architecture topics:

CAC Interface description: Clock Accurate Circuit Driver

Typedef Documentation

◆ cac_ctrl_t

typedef void cac_ctrl_t

CAC control block. Allocate an instance specific control block to pass into the CAC API calls.

Implemented as

Enumeration Type Documentation

◆ cac_clock_source_t

Enumeration of the possible clock sources for both the reference and measurement clocks.

Enumerator
CAC_CLOCK_SOURCE_MAIN_OSC 

Main clock oscillator.

CAC_CLOCK_SOURCE_SUBCLOCK 

Sub-clock.

CAC_CLOCK_SOURCE_HOCO 

HOCO (High speed on chip oscillator)

CAC_CLOCK_SOURCE_MOCO 

MOCO (Middle speed on chip oscillator)

CAC_CLOCK_SOURCE_LOCO 

LOCO (Middle speed on chip oscillator)

CAC_CLOCK_SOURCE_PCLKB 

PCLKB (Peripheral Clock B)

CAC_CLOCK_SOURCE_IWDT 

IWDT- Dedicated on-chip oscillator.

CAC_CLOCK_SOURCE_MEAS_MAX 

Maximum measured clock.

CAC_CLOCK_SOURCE_EXTERNAL 

Externally supplied measurement clock on CACREF pin.

CAC_CLOCK_SOURCE_REF_MAX 

Maximum reference clock.

◆ cac_clock_type_t

Enumeration of the two possible clocks.

Enumerator
CAC_CLOCK_MEASURED 

Measurement clock.

CAC_CLOCK_REFERENCE 

Reference clock.

◆ cac_event_t

Event types returned by the ISR callback when used in CAC interrupt mode

Enumerator
CAC_EVENT_FREQUENCY_ERROR 

Frequency error.

CAC_EVENT_MEASUREMENT_COMPLETE 

Measurement complete.

CAC_EVENT_COUNTER_OVERFLOW 

Counter overflow.

◆ cac_meas_divider_t

Enumeration of available dividers for the measurement clock

Enumerator
CAC_MEAS_DIV_1 

Measurement clock divided by 1.

CAC_MEAS_DIV_4 

Measurement clock divided by 4.

CAC_MEAS_DIV_8 

Measurement clock divided by 8.

CAC_MEAS_DIV_32 

Measurement clock divided by 32.

◆ cac_ref_digfilter_t

Enumeration of available digital filter settings for an external reference clock.

Enumerator
CAC_REF_DIGITAL_FILTER_OFF 

No digital filter on the CACREF pin for reference clock.

CAC_REF_DIGITAL_FILTER_1 

Sampling clock for digital filter = measuring frequency.

CAC_REF_DIGITAL_FILTER_4 

Sampling clock for digital filter = measuring frequency/4.

CAC_REF_DIGITAL_FILTER_16 

Sampling clock for digital filter = measuring frequency/16.

◆ cac_ref_divider_t

Enumeration of available dividers for the reference clock.

Enumerator
CAC_REF_DIV_32 

Reference clock divided by 32.

CAC_REF_DIV_128 

Reference clock divided by 128.

CAC_REF_DIV_1024 

Reference clock divided by 1024.

CAC_REF_DIV_8192 

Reference clock divided by 8192.

◆ cac_ref_edge_t

Enumeration of available edge detect settings for the reference clock.

Enumerator
CAC_REF_EDGE_RISE 

Rising edge detect for the Reference clock.

CAC_REF_EDGE_FALL 

Falling edge detect for the Reference clock.

CAC_REF_EDGE_BOTH 

Both Rising and Falling edges detect for the Reference clock.