PSoC 6 Peripheral Driver Library

General Description

Functions

cy_en_sysclk_status_t Cy_SysClk_ClkPathSetSource (uint32_t clkPath, cy_en_clkpath_in_sources_t source)
 Configures the source for the specified clock path. More...
 
cy_en_clkpath_in_sources_t Cy_SysClk_ClkPathGetSource (uint32_t clkPath)
 Reports which source is selected for the path mux. More...
 

Function Documentation

◆ Cy_SysClk_ClkPathSetSource()

cy_en_sysclk_status_t Cy_SysClk_ClkPathSetSource ( uint32_t  clkPath,
cy_en_clkpath_in_sources_t  source 
)

Configures the source for the specified clock path.

Parameters
clkPathSelects which clock path to configure; 0 is the first clock path, which is the FLL.
sourcecy_en_clkpath_in_sources_t
Returns
cy_en_sysclk_status_t
Note
If calling this function changes an FLL or PLL input frequency, disable the FLL or PLL before calling this function. After calling this function, call the FLL or PLL configure function, for example Cy_SysClk_FllConfigure().
Call SystemCoreClockUpdate after this function calling if it affects the CLK_HF0 frequency.
Call Cy_SysLib_SetWaitStates before calling this function if it affects the CLK_HF0 frequency and the frequency is increasing.
Call Cy_SysLib_SetWaitStates after calling this function if it affects the CLK_HF0 frequency and the frequency is decreasing.
Function Usage
/* Scenario: ECO needs to source HFCLK2 through Path 2. The ECO is
configured through its function calls. */
/* Set the clock path 2 mux to be sourced from ECO */
{
/* Perform error handling */
}
/* Set the HFCLK2 source to clock path 2 and enable HFCLK2 */
/* Enable HFCLK2 */

◆ Cy_SysClk_ClkPathGetSource()

cy_en_clkpath_in_sources_t Cy_SysClk_ClkPathGetSource ( uint32_t  clkPath)

Reports which source is selected for the path mux.

Parameters
clkPathSelects which clock path to report; 0 is the first clock path, which is the FLL.
Returns
cy_en_clkpath_in_sources_t
Function Usage
/* Scenario: A peripheral derived off of Path 1 clock is not clocking at the
expected frequency and accuracy. Need to confirm that the source
of the Path 1 mux is the ECO. */
/* Get the source of the clock path 1 mux */
{
/* Insert error handling */
}