Low Power Callbacks

group group_scb_ezi2c_low_power_functions

Functions

cy_en_syspm_status_t Cy_SCB_EZI2C_DeepSleepCallback(cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)

This function handles the transition of the EZI2C SCB into and out of Deep Sleep mode.

It prevents the device from entering Deep Sleep mode if the EZI2C slave is actively communicating. The following behavior of the EZI2C depends on whether the SCB block is wakeup-capable:

  • Wakeup-capable: on the incoming EZI2C slave address, the slave receives the address and stretches the clock until the device is woken from Deep Sleep mode. If the slave address occurs before the device enters Deep Sleep mode, the device will not enter Deep Sleep mode.

  • Not wakeup-capable: the EZI2C is disabled. It is enabled when the device fails to enter Deep Sleep mode or it is woken from Deep Sleep mode. While the EZI2C is disabled, it stops driving the outputs and ignores the input lines. The slave NACKs all incoming addresses.

This function must be called during execution of Cy_SysPm_CpuEnterDeepSleep. To do this, register this function as a callback before calling Cy_SysPm_CpuEnterDeepSleep : specify CY_SYSPM_DEEPSLEEP as the callback type and call Cy_SysPm_RegisterCallback.

note

Only applicable for rev-08 of the CY8CKIT-062-BLE. For proper operation, when the EZI2C slave is configured to be a wakeup source from Deep Sleep mode, this function must be copied and modified by the user. The EZI2C clock disable code must be inserted in the CY_SYSPM_BEFORE_TRANSITION and clock enable code in the CY_SYSPM_AFTER_TRANSITION mode processing.

Return

cy_en_syspm_status_t

Parameters

cy_en_syspm_status_t Cy_SCB_EZI2C_HibernateCallback(cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)

This function handles the transition of the EZI2C SCB block into Hibernate mode.

It prevents the device from entering Hibernate mode if the EZI2C slave is actively communicating. If the EZI2C is ready to enter Hibernate mode, it is disabled. If the device fails to enter Hibernate mode, the EZI2C is enabled. While the EZI2C is disabled, it stops driving the output and ignores the inputs. The slave NACKs all incoming addresses.

This function must be called during execution of Cy_SysPm_SystemEnterHibernate. To do this, register this function as a callback before calling Cy_SysPm_SystemEnterHibernate : specify CY_SYSPM_HIBERNATE as the callback type and call Cy_SysPm_RegisterCallback.

Return

cy_en_syspm_status_t

Parameters