RTEMS: Clock Group Configuration

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
Clock Group Configuration
Board Support Packages » ARM » Intel Cyclone V » Contributed Code » The Clock Manager API

## 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:

- 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.

## 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_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

## ◆ 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_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.