RTEMS: Clock Source Selection

| RTEMS 5.4-rc2

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

## Functions
ALT_CLK_t | alt_clk_source_get (ALT_CLK_t clk)
ALT_STATUS_CODE | alt_clk_source_set (ALT_CLK_t clk, ALT_CLK_t ref_clk)

## Detailed Description

This API group provide access and control to the input reference clock source selection for a clock or PLL.

## Function Documentation

## ◆ alt_clk_source_get()

ALT_CLK_t alt_clk_source_get | ( | ALT_CLK_t | clk | ) |

Get the input reference clock source selection value for the specified clock or PLL.

NOTE: This function returns a clock value even though clk may specify a clock that does not have a selectable input reference clock source. In this case, the clock value returned is the static clock source for the specified clock. For example calling alt_clk_source_get() with clk set to ALT_CLK_MAIN_PLL will return ALT_CLK_OSC1.

Parameters

  clk | The clock or PLL to retrieve the input reference clock source selection value for.

Returns
  The clock's currently selected input reference clock source.

## ◆ alt_clk_source_set()

ALT_STATUS_CODE alt_clk_source_set | ( | ALT_CLK_t | clk,
|  | ALT_CLK_t | ref_clk
| ) |  |

Set the specified clock's input reference clock source selection.

Parameters

  clk | The clock or PLL to set the input reference clock source selection for.
  ref_clk | The input reference clock source selection value.

Return values

  ALT_E_SUCCESS | The operation was succesful.
  ALT_E_ERROR | The operation failed.
  ALT_E_BAD_ARG | The clk argument designates a clock that does not have a selectable input reference clock source.
  ALT_E_INV_OPTION | The ref_clk argument designates a clock that is an invalid reference clock source for the specified clock.