RTEMS
5.1
|
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) |
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:
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().
clk_group | The 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. |
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
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.
clk_group_raw_cfg | A pointer to the specification to use in the configuration of the clock group. |
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
ALT_E_BAD_VERSION | The clock group configuration specification is invalid for this device. |