Power Status

group group_syspm_functions_power_status

Functions

uint32_t Cy_SysPm_ReadStatus(void)

Reads the power modes status of the system and CPU(s).

Return

The current power mode. See The Power Mode Status Defines.

Function Usage

    /* Scenario: There is a need to check the system current power mode and CPU 
    *  power mode
    */
    if(CY_SYSPM_STATUS_SYSTEM_ULP == (CY_SYSPM_STATUS_SYSTEM_ULP & Cy_SysPm_ReadStatus()))
    {
        /* The system is currently in ULP mode */
    }

bool Cy_SysPm_Cm4IsActive(void)

Checks if CM4 is in CPU Active mode.

Return

  • True if CM4 is in CPU Active mode.

  • False if the CM4 is not in CPU Active mode.

Function Usage

    /* Scenario: There is a need to check if CM4 is in CPU Active mode */
    if (Cy_SysPm_Cm4IsActive())
    {
        /* CM4 is in CPU Active mode */
    }

bool Cy_SysPm_Cm4IsSleep(void)

Checks if the CM4 is in CPU Sleep mode.

Return

  • True if the CM4 is in CPU Sleep mode.

  • False if the CM4 is not in CPU Sleep mode.

Function Usage

    /* Scenario: There is a need to check if CM4 is in CPU Sleep mode */
    if (Cy_SysPm_Cm4IsSleep())
    {
        /* CM4 is in CPU Sleep mode */
    }

bool Cy_SysPm_Cm4IsDeepSleep(void)

Checks if the CM4 is in the CPU Deep Sleep mode.

Return

  • True if CM4 is in CPU Deep Sleep mode.

  • False if the CM4 is not CPU in Deep Sleep mode.

Function Usage

    /* Scenario: There is a need to check if CM4 is in CPU Deep Sleep mode */
    if (Cy_SysPm_Cm4IsDeepSleep())
    {
        /* CM4 is in CPU Deep Sleep mode */
    }

bool Cy_SysPm_Cm0IsActive(void)

Checks if the CM0+ is in CPU Active mode.

Return

  • True if the CM0+ is in CPU Sleep mode.

  • False if the CM0+ is not in CPU Sleep mode.

Function Usage

    /* Scenario: There is a need to check if CM0+ is in CPU Active mode */
    if (Cy_SysPm_Cm0IsActive())
    {
        /* CM0+ is in CPU Active mode */
    }

bool Cy_SysPm_Cm0IsSleep(void)

Checks if the CM0+ is in CPU Sleep mode.

Return

  • True if the CM0+ is in CPU Sleep mode.

  • False if the CM0+ is not in CPU Sleep mode.

Function Usage

    /* Scenario: There is a need to check if CM0+ is in CPU Sleep mode */
    if (Cy_SysPm_Cm0IsSleep())
    {
        /* CM0+ is in CPU Sleep mode */
    }

bool Cy_SysPm_Cm0IsDeepSleep(void)

Checks if the CM0+ is in CPU Deep Sleep mode.

Return

  • True if the CM0+ is in CPU Deep Sleep mode

  • False if the CM0+ is not in CPU Deep Sleep mode

Function Usage

    /* Scenario: There is a need to check if CM0+ is in CPU Deep Sleep mode */
    if (Cy_SysPm_Cm0IsDeepSleep())
    {
        /* CM0+ is in CPU Deep Sleep mode */
    }

bool Cy_SysPm_IsSystemLp(void)

Checks if the system is in LP mode.

Return

  • True the system is in LP mode.

  • False the system is not in LP mode.

Function Usage

    /* Scenario: There is a need to check if the system is in Low Power
    *  mode
    */
    if (Cy_SysPm_IsSystemLp())
    {
        /* The system is in LP mode */
    }

bool Cy_SysPm_IsSystemUlp(void)

Checks if the system is in ULP mode.

Return

  • True the system is in ULP mode.

  • False the system is is not ULP mode.

Function Usage

    /* Scenario: There is a need to check if the system is in Ultra Low Power
    *  mode
    */
    if (Cy_SysPm_IsSystemUlp())
    {
        /* The system is in ULP */
    }