CAT2 Peripheral Driver Library

Functions

void Cy_SysClk_ExtRefSetFrequency (uint32_t freq)
 Sets the signal frequency of the External PLL Reference Clock Source (EXTREF) into the internal storage to be used in Cy_SysClk_PllGetFrequency. More...
 
uint32_t Cy_SysClk_ExtRefGetFrequency (void)
 Returns the frequency of the External PLL Reference Source (EXT_REF) from the internal storage. More...
 

Detailed Description

Function Documentation

◆ Cy_SysClk_ExtRefSetFrequency()

void Cy_SysClk_ExtRefSetFrequency ( uint32_t  freq)

Sets the signal frequency of the External PLL Reference Clock Source (EXTREF) into the internal storage to be used in Cy_SysClk_PllGetFrequency.

Parameters
freqThe frequency of the External PLL Reference Source. Valid range is 1000000...48000000 (1...48 MHz) and also 0. Zero means the external clock signal is not applied.
Note
Not applicable for PSOC4 HVMS/PA.
Function Usage
/* Scenario: External precision 4MHz reference clock is needed for PLL. */
/* Configure the pin P0_6 to be an external reference input */
Cy_GPIO_Pin_FastInit(GPIO_PRT0, 6UL, CY_GPIO_DM_HIGHZ, 0UL, P0_6_EXCO_PLL_REF_IN);
/* Set the EXTREF frequency to 4MHz */
/* Set the EXTREF as the source for PLL */
{
/* Insert error handling */
}
/* In case if there is a need to get the EXTREF frequency */
uint32_t extRefFrequency = Cy_SysClk_ExtRefGetFrequency();

◆ Cy_SysClk_ExtRefGetFrequency()

uint32_t Cy_SysClk_ExtRefGetFrequency ( void  )

Returns the frequency of the External PLL Reference Source (EXT_REF) from the internal storage.

Returns
The frequency of the External PLL Reference Source.
Note
Not applicable for PSOC4 HVMS/PA.
Function Usage
/* Scenario: External precision 4MHz reference clock is needed for PLL. */
/* Configure the pin P0_6 to be an external reference input */
Cy_GPIO_Pin_FastInit(GPIO_PRT0, 6UL, CY_GPIO_DM_HIGHZ, 0UL, P0_6_EXCO_PLL_REF_IN);
/* Set the EXTREF frequency to 4MHz */
/* Set the EXTREF as the source for PLL */
{
/* Insert error handling */
}
/* In case if there is a need to get the EXTREF frequency */
uint32_t extRefFrequency = Cy_SysClk_ExtRefGetFrequency();