RA Flexible Software Package Documentation
Release v5.6.0
|
|
Interface for clock frequency accuracy measurements.
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 to be measured.
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 |
enum | cac_clock_type_t |
enum | cac_clock_source_t |
enum | cac_ref_divider_t |
enum | cac_ref_digfilter_t |
enum | cac_ref_edge_t |
enum | cac_meas_divider_t |
struct cac_ref_clock_config_t |
Structure defining the settings that apply to reference clock configuration.
Data Fields | ||
---|---|---|
cac_ref_divider_t | divider | Divider specification for the Reference clock. |
cac_clock_source_t | clock | Clock source for the Reference clock. |
cac_ref_digfilter_t | digfilter | Digital filter selection for the CACREF ext clock. |
cac_ref_edge_t | edge | Edge detection for the Reference clock. |
struct cac_meas_clock_config_t |
Structure defining the settings that apply to measurement clock configuration.
Data Fields | ||
---|---|---|
cac_meas_divider_t | divider | Divider specification for the Measurement clock. |
cac_clock_source_t | clock | Clock source for the Measurement clock. |
struct cac_callback_args_t |
Callback function parameter data
Data Fields | ||
---|---|---|
cac_event_t | event | The event can be used to identify what caused the callback. |
void const * | p_context | Value provided in configuration structure. |
struct cac_cfg_t |
CAC Configuration
Data Fields | |
cac_ref_clock_config_t | cac_ref_clock |
Reference clock specific settings. | |
cac_meas_clock_config_t | cac_meas_clock |
Measurement clock specific settings. | |
uint16_t | cac_upper_limit |
The upper limit counter threshold. | |
uint16_t | cac_lower_limit |
The lower limit counter threshold. | |
IRQn_Type | mendi_irq |
Measurement End IRQ number. | |
IRQn_Type | ovfi_irq |
Measurement Overflow IRQ number. | |
IRQn_Type | ferri_irq |
Frequency Error IRQ number. | |
uint8_t | mendi_ipl |
Measurement end interrupt priority. | |
uint8_t | ovfi_ipl |
Overflow interrupt priority. | |
uint8_t | ferri_ipl |
Frequency error interrupt priority. | |
void(* | p_callback )(cac_callback_args_t *p_args) |
Callback provided when a CAC interrupt ISR occurs. | |
void const * | p_context |
Passed to user callback in cac_callback_args_t. | |
void const * | p_extend |
CAC hardware dependent configuration */. | |
struct cac_api_t |
CAC functions implemented at the HAL layer API
Data Fields | |
fsp_err_t(* | open )(cac_ctrl_t *const p_ctrl, cac_cfg_t const *const p_cfg) |
fsp_err_t(* | startMeasurement )(cac_ctrl_t *const p_ctrl) |
fsp_err_t(* | stopMeasurement )(cac_ctrl_t *const p_ctrl) |
fsp_err_t(* | read )(cac_ctrl_t *const p_ctrl, uint32_t *const p_counter) |
fsp_err_t(* | callbackSet )(cac_ctrl_t *const p_ctrl, void(*p_callback)(cac_callback_args_t *), void const *const p_context, cac_callback_args_t *const p_callback_memory) |
fsp_err_t(* | close )(cac_ctrl_t *const p_ctrl) |
fsp_err_t(* cac_api_t::open) (cac_ctrl_t *const p_ctrl, cac_cfg_t const *const p_cfg) |
Open function for CAC device.
[out] | p_ctrl | Pointer to CAC device control. Must be declared by user. |
[in] | cac_cfg_t | Pointer to CAC configuration structure. |
fsp_err_t(* cac_api_t::startMeasurement) (cac_ctrl_t *const p_ctrl) |
Begin a measurement for the CAC peripheral.
[in] | p_ctrl | Pointer to CAC device control. |
fsp_err_t(* cac_api_t::stopMeasurement) (cac_ctrl_t *const p_ctrl) |
End a measurement for the CAC peripheral.
[in] | p_ctrl | Pointer to CAC device control. |
fsp_err_t(* cac_api_t::read) (cac_ctrl_t *const p_ctrl, uint32_t *const p_counter) |
Read function for CAC peripheral.
[in] | p_ctrl | Control for the CAC device context. |
[in] | p_counter | Pointer to variable in which to store the current CACNTBR register contents. |
fsp_err_t(* cac_api_t::callbackSet) (cac_ctrl_t *const p_ctrl, void(*p_callback)(cac_callback_args_t *), void const *const p_context, cac_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Control block set in cac_api_t::open call |
[in] | p_callback | Callback function to register |
[in] | p_context | Pointer to send to callback function |
[in] | p_working_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
fsp_err_t(* cac_api_t::close) (cac_ctrl_t *const p_ctrl) |
Close function for CAC device.
[in] | p_ctrl | Pointer to CAC device control. |
struct cac_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
cac_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
cac_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
cac_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void cac_ctrl_t |
CAC control block. Allocate an instance specific control block to pass into the CAC API calls.
enum cac_event_t |
enum cac_clock_type_t |
enum cac_clock_source_t |
Enumeration of the possible clock sources for both the reference and measurement clocks.
enum cac_ref_divider_t |
enum cac_ref_digfilter_t |
Enumeration of available digital filter settings for an external reference clock.
enum cac_ref_edge_t |
enum cac_meas_divider_t |