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:
- Clock Gates
- Clock Dividers
- Clock Source Selection Options
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:
- As static design information generated by an ACDS clock configuration tool and passed to embedded software for dynamic loading.
- By calling alt_clk_group_cfg_raw_get() at run-time from an SoC FPGA that has programmatically established a known good clock group configuration using the clock manager API configuration functions.
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_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. |
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
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_cfg | A pointer to the specification to use in the configuration of the clock group. |
- Return values
-
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. |
ALT_STATUS_CODE alt_clk_clkmgr_init |
( |
void |
| ) |
|
alt_clk_clkmgr_init() attempt to fix the pll counter max frequencies, since thses frequencies are not known in advance until preloader programmed clock manager.
- Parameters
-
- Return values
-
ALT_E_SUCCESS | Successful status. |
ALT_E_ERROR | Details about error status code |
ALT_STATUS_CODE alt_clk_clkmgr_uninit |
( |
void |
| ) |
|