MTB CAT1 Peripheral driver library

General Description

Functions

cy_en_syspm_status_t Cy_SCB_I2C_DeepSleepCallback (cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)
 This function handles the transition of the I2C SCB into and out of Deep Sleep mode. More...
 
cy_en_syspm_status_t Cy_SCB_I2C_HibernateCallback (cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)
 This function handles the transition of the I2C SCB block into Hibernate mode. More...
 

Function Documentation

◆ Cy_SCB_I2C_DeepSleepCallback()

cy_en_syspm_status_t Cy_SCB_I2C_DeepSleepCallback ( cy_stc_syspm_callback_params_t callbackParams,
cy_en_syspm_callback_mode_t  mode 
)

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

It prevents the device from entering Deep Sleep mode if the I2C slave or master is actively communicating. The behavior of the I2C SCB in Deep Sleep depends on whether the SCB block is wakeup-capable or not:

  • Wakeup-capable: during Deep Sleep mode on incoming I2C slave address the slave receives address and stretches the clock until the device is awoken from Deep Sleep mode. If the slave address occurs before the device enters Deep Sleep mode, the device will not enter Deep Sleep mode. Only the I2C slave can be configured to be a wakeup source from Deep Sleep mode.
  • Not wakeup-capable: the SCB is disabled in Deep Sleep mode. It is re-enabled if the device fails to enter Deep Sleep mode or when the device is awoken from Deep Sleep mode. While the SCB is disabled it stops driving the outputs and ignores the inputs. The slave NACKs all incoming addresses.

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

Parameters
callbackParamsThe pointer to the callback parameters structure cy_stc_syspm_callback_params_t.
modeCallback mode, see cy_en_syspm_callback_mode_t
Returns
cy_en_syspm_status_t
Note
Only applicable for rev-08 of the CY8CKIT-062-BLE. For proper operation, when the I2C slave is configured to be a wakeup source from Deep Sleep mode, this function must be copied and modified by the user. The I2C clock disable code must be inserted in the CY_SYSPM_BEFORE_TRANSITION and clock enable code in the CY_SYSPM_AFTER_TRANSITION mode processing.

Please refer to the section I2C Master Clock Synchronization for more information.

◆ Cy_SCB_I2C_HibernateCallback()

cy_en_syspm_status_t Cy_SCB_I2C_HibernateCallback ( cy_stc_syspm_callback_params_t callbackParams,
cy_en_syspm_callback_mode_t  mode 
)

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

It prevents the device from entering Hibernate mode if the I2C slave or master is actively communicating. If the I2C is ready to enter Hibernate mode it is disabled. If the device failed to enter Hibernate mode, the SCB is enabled. After the SCB is disabled, it stops driving the outputs and ignores the inputs. The slave NACKs all incoming addresses.

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

Parameters
callbackParamsThe pointer to the callback parameters structure cy_stc_syspm_callback_params_t.
modeCallback mode, see cy_en_syspm_callback_mode_t
Returns
cy_en_syspm_status_t