RTEMS  5.1
Functions

Functions

ALT_STATUS_CODE alt_clk_group_cfg_raw_get (ALT_CLK_GRP_t clk_group, ALT_CLK_GROUP_RAW_CFG_t *clk_group_raw_cfg)
 
ALT_STATUS_CODE alt_clk_group_cfg_raw_set (const ALT_CLK_GROUP_RAW_CFG_t *clk_group_raw_cfg)
 
ALT_STATUS_CODE alt_clk_clkmgr_init (void)
 

Detailed Description

This API provides the ability to safely set the configuration of a clock group with a single function call.

A clock group is defined as set of clocks and signals generated from a common PLL VCO. The PLL and its derived clocks are treated as a single clock group. The clocks sourced directly or indirectly from the PLL may or may not have these features:

The use case for application of the Clock Group Configuration functions is the ability to safely configure an entire clock group from a known good clock group configuration using the run-time function alt_clk_group_cfg_raw_set().

A known good clock group configuration may be generated by one of the following methods:

Function Documentation

◆ alt_clk_group_cfg_raw_get()

ALT_STATUS_CODE alt_clk_group_cfg_raw_get ( ALT_CLK_GRP_t  clk_group,
ALT_CLK_GROUP_RAW_CFG_t clk_group_raw_cfg 
)

Get the raw configuration state of the designated clock group.

This function is used to capture the configuration state of the specified clock group in a private (raw) data structure. The raw data structure may be saved and used later to restore the clock group configuration using alt_clk_group_cfg_raw_get().

Parameters
clk_groupThe clock group configuration to capture.
clk_group_raw_cfg[out] A pointer to a private (raw) data structure to store the captured clock group configuration.
Return values
ALT_E_SUCCESSSuccessful status.
ALT_E_ERRORDetails about error status code

◆ alt_clk_group_cfg_raw_set()

ALT_STATUS_CODE alt_clk_group_cfg_raw_set ( const ALT_CLK_GROUP_RAW_CFG_t clk_group_raw_cfg)

Set the clock group configuration.

This function is used to safely set the configuration state of a clock group from a raw clock group configuration specification. The raw clock group configuration specification may be a configuration previously captured with alt_clk_group_cfg_raw_get() or a group clock configuration generated by an external utility.

Parameters
clk_group_raw_cfgA pointer to the specification to use in the configuration of the clock group.
Return values
ALT_E_SUCCESSSuccessful status.
ALT_E_ERRORDetails about error status code
ALT_E_BAD_VERSIONThe clock group configuration specification is invalid for this device.