RTEMS  5.0.0
Functions

Functions

ALT_STATUS_CODE alt_clk_pll_bypass_disable (ALT_CLK_t pll)
 
ALT_STATUS_CODE alt_clk_pll_bypass_enable (ALT_CLK_t pll, bool use_input_mux)
 
ALT_STATUS_CODE alt_clk_pll_is_bypassed (ALT_CLK_t pll)
 

Detailed Description

When a PLL is in bypass, the PLL clock logic is kept in reset. In this manner, the PLL clock can be free running while it stabilizes and achieves lock. The bypass logic isolates PLL configuration registers from the clock while changes are made to the PLL settings.

The bypass controls are used by software to change the source clock input reference (for Peripheral and SDRAM PLLs) and is recommended when changing settings that may affect the ability of the VCO to maintain lock. When a PLL is taken in or out of bypass the PLL output clocks will pause momentarily while the clocks are in transition, There will be no glitches or clocks shorter than the either the old or the new clock period.

In summary, the PLL bypass controls permit:

Function Documentation

◆ alt_clk_pll_bypass_disable()

ALT_STATUS_CODE alt_clk_pll_bypass_disable ( ALT_CLK_t  pll)

Disable bypass mode for the specified PLL. This operation takes the PLL out of bypass mode.

Parameters
pllThe PLL to take out of bypass mode.
Return values
ALT_E_SUCCESSThe operation was succesful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe pll argument specified a non PLL clock value.

◆ alt_clk_pll_bypass_enable()

ALT_STATUS_CODE alt_clk_pll_bypass_enable ( ALT_CLK_t  pll,
bool  use_input_mux 
)

Enable bypass mode for the specified PLL.

Parameters
pllThe PLL to put into bypass mode.
use_input_muxIf TRUE then use the PLLs reference clock input source selection to directly drive the bypass clock. If FALSE then use bypass clock directly driven by the osc1_clk.
Return values
ALT_E_SUCCESSThe operation was succesful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe pll argument specified a non PLL clock value.
ALT_E_INV_OPTIONTRUE is an invalid option for use_input_mux with the pll selection.

◆ alt_clk_pll_is_bypassed()

ALT_STATUS_CODE alt_clk_pll_is_bypassed ( ALT_CLK_t  pll)

Return whether the specified PLL is in bypass or not.

Parameters
pllThe PLL to check whether in bypass mode or not.
Return values
ALT_E_TRUEThe PLL is in bypass mode.
ALT_E_FALSEThe PLL is not in bypass mode.
ALT_E_BAD_ARGThe pll argument designates a non PLL clock value.