Functions

group group_sysclk_clk_pump_funcs

Functions

void Cy_SysClk_ClkPumpSetSource(cy_en_clkpump_in_sources_t source)

Sets the source for the pump clock (clk_pump).

The pump clock can be used for the analog pumps in the CTBm block.

note

Do not change the source while the pump clock is enabled.

Function Usage

    /* Scenario: The pump clock source needs to be updated to path 0 clock. */

    if(CY_SYSCLK_PUMP_IN_CLKPATH0 != Cy_SysClk_ClkPumpGetSource())
    {
        Cy_SysClk_ClkPumpSetSource(CY_SYSCLK_PUMP_IN_CLKPATH0);
    }

Parameters

cy_en_clkpump_in_sources_t Cy_SysClk_ClkPumpGetSource(void)

Reports the source for the pump clock (clk_pump).

Return

cy_en_clkpump_in_sources_t

Function Usage

    /* Scenario: The pump clock source needs to be updated to path 0 clock. */

    if(CY_SYSCLK_PUMP_IN_CLKPATH0 != Cy_SysClk_ClkPumpGetSource())
    {
        Cy_SysClk_ClkPumpSetSource(CY_SYSCLK_PUMP_IN_CLKPATH0);
    }

void Cy_SysClk_ClkPumpSetDivider(cy_en_clkpump_divide_t divider)

Sets the divider of the pump clock (clk_pump).

note

Do not change the divider value while the pump clock is enabled.

Function Usage

    /* Scenario: The pump clock divider needs to be updated to 4. */

    if(CY_SYSCLK_PUMP_DIV_4 != Cy_SysClk_ClkPumpGetDivider())
    {
        Cy_SysClk_ClkPumpSetDivider(CY_SYSCLK_PUMP_DIV_4);
    }

Parameters

cy_en_clkpump_divide_t Cy_SysClk_ClkPumpGetDivider(void)

Reports the divider value for the pump clock (clk_pump).

Return

cy_en_clkpump_divide_t

Function Usage

    /* Scenario: The pump clock divider needs to be updated to 4. */

    if(CY_SYSCLK_PUMP_DIV_4 != Cy_SysClk_ClkPumpGetDivider())
    {
        Cy_SysClk_ClkPumpSetDivider(CY_SYSCLK_PUMP_DIV_4);
    }

void Cy_SysClk_ClkPumpEnable(void)

Enables the pump clock (clk_pump).

The pump clock can be used for the analog pumps in the CTBm block.

Function Usage

    /* Scenario: The Pump clock must be sourced from the Path 2 clock. The
                 frequency of the pump clock must be 1/16 of Path 2 clock. */

    Cy_SysClk_ClkPumpSetSource(CY_SYSCLK_PUMP_IN_CLKPATH2);
    Cy_SysClk_ClkPumpSetDivider(CY_SYSCLK_PUMP_DIV_16);
    Cy_SysClk_ClkPumpEnable();
    /* Use the pump clock as the source for CTB(m) blocks. */
    /* In case if there is a need to get the pump clock frequency */
    uint32_t pumpClkFreq = Cy_SysClk_ClkPumpGetFrequency();

bool Cy_SysClk_ClkPumpIsEnabled(void)

Reports the Enabled/Disabled status of the ClkPump.

note

This API is available for CAT1A devices.

Return

Boolean status of ClkPump: true - Enabled, false - Disabled.

Function Usage

    /* Scenario: Pump clock is no longer required and needs to be disabled.
                 All peripherals clocked using this source are disabled. */

    if (Cy_SysClk_ClkPumpIsEnabled())
    {
        Cy_SysClk_ClkPumpDisable();
    }

void Cy_SysClk_ClkPumpDisable(void)

Disables the pump clock (clk_pump).

Function Usage

    /* Scenario: Pump clock is no longer required and needs to be disabled.
                 All peripherals clocked using this source are disabled. */

    if (Cy_SysClk_ClkPumpIsEnabled())
    {
        Cy_SysClk_ClkPumpDisable();
    }

uint32_t Cy_SysClk_ClkPumpGetFrequency(void)

Reports the frequency of the pump clock (clk_pump).

note

If the the pump clock is not enabled - a zero frequency is reported.

note

This API is available for CAT1A devices.

Function Usage

    /* Scenario: The Pump clock must be sourced from the Path 2 clock. The
                 frequency of the pump clock must be 1/16 of Path 2 clock. */

    Cy_SysClk_ClkPumpSetSource(CY_SYSCLK_PUMP_IN_CLKPATH2);
    Cy_SysClk_ClkPumpSetDivider(CY_SYSCLK_PUMP_DIV_16);
    Cy_SysClk_ClkPumpEnable();
    /* Use the pump clock as the source for CTB(m) blocks. */
    /* In case if there is a need to get the pump clock frequency */
    uint32_t pumpClkFreq = Cy_SysClk_ClkPumpGetFrequency();