PSoC 6 Peripheral Driver Library

General Description

Functions

cy_en_syspm_status_t Cy_SysPm_WriteVoltageBitForFlash (cy_en_syspm_flash_voltage_bit_t value)
 Function that changes the voltage setting for flash. More...
 
void Cy_SysPm_SaveRegisters (cy_stc_syspm_backup_regs_t *regs)
 Saves non-retained UDB registers and the slow and fast clock dividers before system entering system Deep Sleep. More...
 
void Cy_SysPm_RestoreRegisters (cy_stc_syspm_backup_regs_t const *regs)
 Restores non-retained UDB registers and the slow and fast clock dividers before system entering system Deep Sleep. More...
 

Function Documentation

◆ Cy_SysPm_WriteVoltageBitForFlash()

cy_en_syspm_status_t Cy_SysPm_WriteVoltageBitForFlash ( cy_en_syspm_flash_voltage_bit_t  value)

Function that changes the voltage setting for flash.

Note
Call this function before system enters ULP mode. Call this function after the system enters LP mode.
Parameters
valueValue to be set in the flash voltage control register. See cy_en_syspm_flash_voltage_bit_t.
Returns
  • CY_SYSPM_SUCCESS - The voltage is set.
  • CY_SYSPM_CANCELED - Operation was canceled. Call the function again until the function returns CY_SYSPM_SUCCESS. See cy_en_syspm_status_t.
Function Usage
/* The system may continue operating while the voltage on Vccd
* discharges to the new voltage. The time it takes to reach the
* new voltage depends on operating conditions, including the load current
* on Vccd and external capacitor size.
*/
SRSS_PWR_BUCK_CTL =
_CLR_SET_FLD32U((SRSS_PWR_BUCK_CTL), SRSS_PWR_BUCK_CTL_BUCK_OUT1_SEL, (uint32_t) CY_SYSPM_BUCK_OUT1_VOLTAGE_ULP);

◆ Cy_SysPm_SaveRegisters()

void Cy_SysPm_SaveRegisters ( cy_stc_syspm_backup_regs_t regs)

Saves non-retained UDB registers and the slow and fast clock dividers before system entering system Deep Sleep.

Must be called if programmable logic or function are implemented in the UDB array.

Cypress ID #280370, #1451.

Parameters
regsThe structure where the registers are saved.
Function Usage
/* Scenario: There is a need to save the non-retained UDB registers while
* in system Deep Sleep routine.
*/
/* Save non-retained UDB registers */
SCB_SCR |= SCB_SCR_SLEEPDEEP_Msk;
__WFI();
/* Restore non-retained UDB registers after system Deep Sleep */

◆ Cy_SysPm_RestoreRegisters()

void Cy_SysPm_RestoreRegisters ( cy_stc_syspm_backup_regs_t const *  regs)

Restores non-retained UDB registers and the slow and fast clock dividers before system entering system Deep Sleep.

Must be called if programmable logic or function are implemented in the UDB array.

Cypress ID #280370, #1451.

Parameters
regsThe structure with data stored (using Cy_SysPm_SaveRegisters()) into the required registers after Deep Sleep.
Function Usage
/* Scenario: There is a need to save the non-retained UDB registers while
* in system Deep Sleep routine.
*/
/* Save non-retained UDB registers */
SCB_SCR |= SCB_SCR_SLEEPDEEP_Msk;
__WFI();
/* Restore non-retained UDB registers after system Deep Sleep */