PSoC 6 Peripheral Driver Library

General Description

Functions

void Cy_SysPm_IoUnfreeze (void)
 This function unfreezes the I/O cells that are automatically frozen when Hibernate is entered with the call to Cy_SysPm_SystemEnterHibernate(). More...
 
__STATIC_INLINE bool Cy_SysPm_IoIsFrozen (void)
 Checks whether IOs are frozen. More...
 

Function Documentation

◆ Cy_SysPm_IoUnfreeze()

void Cy_SysPm_IoUnfreeze ( void  )

This function unfreezes the I/O cells that are automatically frozen when Hibernate is entered with the call to Cy_SysPm_SystemEnterHibernate().

I/O cells remain frozen after a wakeup from Hibernate mode until the firmware unfreezes them by calling this function.

If the firmware must retain the data value on the pin, then the value must be read and re-written to the pin's port data register before calling this function. Furthermore, the drive mode must be re-programmed before the pins are unfrozen. If this is not done, the pin will change to the default state the moment the freeze is removed.

Note that I/O cell configuration can be changed while frozen. The new configuration becomes effective only after the pins are unfrozen.

Function Usage
/* Scenario: There is a need to use Hibernate power mode and retain the
* the I/O state after the a wake-up from Hibernate
*/
/* Check the I/O freeze status after the boot.
* If the I/O is frozen it means we have returned from Hibernate.
*/
{
/* Restore the I/O configuration before unfreezing.
* Use configuration data programmed into firmware stored in S
* RSS->PWR_HIB_DATA[] or BACKUP->BREG[]
* before the Hibernate was entered. Th emost common use case is to
* restore from GPIO driver the firmware initialization structures.
*/
}
/* Save the I/O before entering Hibernate. You can store the
* the I/O configuration into SRSS->PWR_HIB_DATA[] or
* BACKUP->BREG[] registers.
*/
/* Enter Hibernate mode */

◆ Cy_SysPm_IoIsFrozen()

__STATIC_INLINE bool Cy_SysPm_IoIsFrozen ( void  )

Checks whether IOs are frozen.

Returns
  • True if IOs are frozen.
  • False if IOs are unfrozen.
Function Usage
/* Scenario: There is a need to use Hibernate power mode and retain the
* the I/O state after the a wake-up from Hibernate
*/
/* Check the I/O freeze status after the boot.
* If the I/O is frozen it means we have returned from Hibernate.
*/
{
/* Restore the I/O configuration before unfreezing.
* Use configuration data programmed into firmware stored in S
* RSS->PWR_HIB_DATA[] or BACKUP->BREG[]
* before the Hibernate was entered. Th emost common use case is to
* restore from GPIO driver the firmware initialization structures.
*/
}
/* Save the I/O before entering Hibernate. You can store the
* the I/O configuration into SRSS->PWR_HIB_DATA[] or
* BACKUP->BREG[] registers.
*/
/* Enter Hibernate mode */