MTB CAT1 Peripheral driver library

General Description

Functions

void Cy_SysClk_ClkFastSetDivider (uint8_t divider)
 Sets the clock divider for the fast clock, which sources the main processor. More...
 
uint8_t Cy_SysClk_ClkFastGetDivider (void)
 Returns the clock divider for the fast clock. More...
 
uint32_t Cy_SysClk_ClkFastGetFrequency (void)
 Reports the frequency of the fast clock. More...
 
void Cy_SysClk_ClkFastSrcSetDivider (uint32_t clkFastNum, uint8_t intDiv, uint8_t fracDiv)
 Sets the clock divider for the fast clock, which sources the main processor. More...
 
void Cy_SysClk_ClkFastSrcGetDivider (uint32_t clkFastNum, uint32_t *dividerIntValue, uint32_t *dividerFracValue)
 Returns the Integer and Fractional clock divider for the fast clock. More...
 
uint32_t Cy_SysClk_ClkFastSrcGetFrequency (uint32_t clkFastNum)
 Reports the frequency of the fast clock. More...
 

Function Documentation

◆ Cy_SysClk_ClkFastSetDivider()

void Cy_SysClk_ClkFastSetDivider ( uint8_t  divider)

Sets the clock divider for the fast clock, which sources the main processor.

The source of this divider is clkHf[0].

Parameters
dividerdivider value between 0 and 255. Causes integer division of (divider value + 1), or division by 1 to 256.
Note
Call SystemCoreClockUpdate after this function calling.
Call Cy_SysLib_SetWaitStates before calling this function if CLK_FAST frequency is increasing.
Call Cy_SysLib_SetWaitStates after calling this function if CLK_FAST frequency is decreasing.
This API is available only for CAT1A devices.
Function Usage
/* Scenario: HFCLK0 is configured and enabled. The Fast clock sourcing the
CM4 core must run at a frequency that is 1/16 of HFCLK0. */
{
}
/* Get the CM4 clock source frequency */
uint32_t clkFastfreq = Cy_SysClk_ClkFastGetFrequency();

◆ Cy_SysClk_ClkFastGetDivider()

uint8_t Cy_SysClk_ClkFastGetDivider ( void  )

Returns the clock divider for the fast clock.

Returns
The divider value for the fast clock. The integer division done is by (divider value + 1), or division by 1 to 256.
Note
This API is available only for CAT1A devices.
Function Usage
/* Scenario: HFCLK0 is configured and enabled. The Fast clock sourcing the
CM4 core must run at a frequency that is 1/16 of HFCLK0. */
{
}
/* Get the CM4 clock source frequency */
uint32_t clkFastfreq = Cy_SysClk_ClkFastGetFrequency();

◆ Cy_SysClk_ClkFastGetFrequency()

uint32_t Cy_SysClk_ClkFastGetFrequency ( void  )

Reports the frequency of the fast clock.

Returns
The frequency, in Hz.
Note
This API is available only for CAT1A devices.
Function Usage
/* Scenario: HFCLK0 is configured and enabled. The Fast clock sourcing the
CM4 core must run at a frequency that is 1/16 of HFCLK0. */
{
}
/* Get the CM4 clock source frequency */
uint32_t clkFastfreq = Cy_SysClk_ClkFastGetFrequency();

◆ Cy_SysClk_ClkFastSrcSetDivider()

void Cy_SysClk_ClkFastSrcSetDivider ( uint32_t  clkFastNum,
uint8_t  intDiv,
uint8_t  fracDiv 
)

Sets the clock divider for the fast clock, which sources the main processor.

The source of this divider is clkHf[0].

Parameters
clkFastNum0 for CLOCK_FAST_0 and 1 for CLOCK_FAST_1
intDivInteger divider
fracDivFractional divider
Note
Call SystemCoreClockUpdate after this function calling.
Call Cy_SysLib_SetWaitStates before calling this function if CLK_FAST frequency is increasing.
Call Cy_SysLib_SetWaitStates after calling this function if CLK_FAST frequency is decreasing.
This API is available only for CAT1C devices.

◆ Cy_SysClk_ClkFastSrcGetDivider()

void Cy_SysClk_ClkFastSrcGetDivider ( uint32_t  clkFastNum,
uint32_t *  dividerIntValue,
uint32_t *  dividerFracValue 
)

Returns the Integer and Fractional clock divider for the fast clock.

Parameters
clkFastNum0 for CLOCK_FAST_0 and 1 for CLOCK_FAST_1
dividerIntValue- Integer divider
dividerFracValue- Fractional divider
Returns
None. Loads pointed-to variables.
Note
This API is available only for CAT1C devices.

◆ Cy_SysClk_ClkFastSrcGetFrequency()

uint32_t Cy_SysClk_ClkFastSrcGetFrequency ( uint32_t  clkFastNum)

Reports the frequency of the fast clock.

Parameters
clkFastNum0 for CLOCK_FAST_0 and 1 for CLOCK_FAST_1
Returns
The frequency, in Hz.
Note
This API is available only for CAT1C devices.