MTB CAT1 Peripheral driver library

General Description

Functions

void Cy_SysPm_BackupSetSupply (cy_en_syspm_vddbackup_control_t vddBackControl)
 Sets the backup supply (Vddback) operation mode. More...
 
cy_en_syspm_vddbackup_control_t Cy_SysPm_BackupGetSupply (void)
 Returns the current backup supply (Vddback) operation mode. More...
 
void Cy_SysPm_BackupEnableVoltageMeasurement (void)
 This function enables Vbackup supply measurement by the ADC. More...
 
void Cy_SysPm_BackupDisableVoltageMeasurement (void)
 The function disables Vbackup supply measurement by the ADC by disconnecting the Vbackup supply from AMuxBusA. More...
 
void Cy_SysPm_BackupSuperCapCharge (cy_en_syspm_sc_charge_key_t key)
 Configures the supercapacitor charger circuit. More...
 
void Cy_SysPm_BackupWordStore (uint32_t wordIndex, uint32_t *wordSrcPointer, uint32_t wordSize)
 Stores supported number of words(SRSS_BACKUP_NUM_BREG) in Backup Domain. More...
 
void Cy_SysPm_BackupWordReStore (uint32_t wordIndex, uint32_t *wordDstPointer, uint32_t wordSize)
 Restores supported number of words(SRSS_BACKUP_NUM_BREG) in Backup Domain. More...
 
cy_en_syspm_status_t Cy_SysPm_SetupDeepSleepRAM (cy_en_syspm_dsram_checks_t dsramCheck, uint32_t *dsramIntState)
 Implements Pre and Post Deepsleep RAM Setup. More...
 
cy_en_syspm_status_t Cy_SysPm_CpuEnterRAMOffDeepSleep (void)
 Sets executing CPU to the Deep Sleep mode forceful RAM OFF. More...
 

Function Documentation

◆ Cy_SysPm_BackupSetSupply()

void Cy_SysPm_BackupSetSupply ( cy_en_syspm_vddbackup_control_t  vddBackControl)

Sets the backup supply (Vddback) operation mode.

Parameters
vddBackControlSelects backup supply (Vddback) operation mode. See cy_en_syspm_vddbackup_control_t.

Refer to device TRM for more detail about backup supply modes. Will do nothing if device TRM denotes VDDBAK_CTL register field is unavailable.

Function Usage
/* Scenario: There is a need to set only Vbackup to supply Vddbackup */
/* Ensure there is a valid power connection on backup pin */
#if defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u)))
#endif /* defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u))) */

◆ Cy_SysPm_BackupGetSupply()

cy_en_syspm_vddbackup_control_t Cy_SysPm_BackupGetSupply ( void  )

Returns the current backup supply (Vddback) operation mode.

Returns
The current backup supply (Vddback) operation mode, see cy_en_syspm_status_t.

Refer to device TRM for more detail about backup supply modes.

Function Usage
/* Scenario: There is a need to get the current backup supply (Vddback) operation mode */
#if defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u)))
(void) mode;
#endif /* defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u))) */

◆ Cy_SysPm_BackupEnableVoltageMeasurement()

void Cy_SysPm_BackupEnableVoltageMeasurement ( void  )

This function enables Vbackup supply measurement by the ADC.

The function connects the Vbackup supply to AMuxBusA. The ADC input can then be connected to AMuxBusA. Note that the measured signal is scaled by 10% to allow full range measurement by the ADC.

Refer to device TRM for more detail about backup supply modes. Will do nothing if device TRM denotes VBACKUP_MEAS register field is unavailable.

Function Usage
/* Scenario: There is a need to enable Vbackup supply measurement
* via AMuxBusA, e.g. by the internal ADC.
*/
/* Connect amuxbus_sar to amuxbus_main */
HSIOM->AMUX_SPLIT_CTL[6] = HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk;
/* Connect amuxbus_adft0_vddd to amuxbus_main */
HSIOM->AMUX_SPLIT_CTL[0] = HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk;
/* Connect Vddbackmeasure to AMuxBus */
#if defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u)))
#endif /* defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u))) */

◆ Cy_SysPm_BackupDisableVoltageMeasurement()

void Cy_SysPm_BackupDisableVoltageMeasurement ( void  )

The function disables Vbackup supply measurement by the ADC by disconnecting the Vbackup supply from AMuxBusA.

Refer to device TRM for more detail about backup supply modes. Will do nothing if device TRM denotes VBACKUP_MEAS register field is unavailable.

Function Usage
/* Scenario: There is a need to disable the Vbackup supply measurement by the ADC */
#if defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u)))
#endif /* defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u))) */

◆ Cy_SysPm_BackupSuperCapCharge()

void Cy_SysPm_BackupSuperCapCharge ( cy_en_syspm_sc_charge_key_t  key)

Configures the supercapacitor charger circuit.

Parameters
keyPasses the key to enable or disable the supercapacitor charger circuit. See cy_en_syspm_sc_charge_key_t.
Warning
This function is used only for charging the supercapacitor. Do not use this function to charge a battery. Refer to device TRM for more detail about backup supply modes. Will do nothing if device TRM denotes EN_CHARGE_KEY register field is unavailable.
Function Usage
/* Scenario: There is a need to charge the supercapacitor which will
* supply the RTC during Hibernate mode for a few hours
*/
#if defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u)))
#endif /* defined (CY_IP_MXS40SSRSS) || (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2) && (defined (SRSS_BACKUP_VBCK_PRESENT) && (SRSS_BACKUP_VBCK_PRESENT == 1u))) */

◆ Cy_SysPm_BackupWordStore()

void Cy_SysPm_BackupWordStore ( uint32_t  wordIndex,
uint32_t *  wordSrcPointer,
uint32_t  wordSize 
)

Stores supported number of words(SRSS_BACKUP_NUM_BREG) in Backup Domain.

Parameters
wordIndexOffset/Index of Backup Register Region(BREG) to where the data needs to be stored. Starts with 0, ends with (SRSS_BACKUP_NUM_BREG - 1)
wordSrcPointerSource address from where the words have to be picked and backed up.
wordSizeNumber of words to be stored
Note
This API is available for CAT1A (TVIIBE only), CAT1B and CAT1C devices.

◆ Cy_SysPm_BackupWordReStore()

void Cy_SysPm_BackupWordReStore ( uint32_t  wordIndex,
uint32_t *  wordDstPointer,
uint32_t  wordSize 
)

Restores supported number of words(SRSS_BACKUP_NUM_BREG) in Backup Domain.

Parameters
wordIndexOffset/Index of Backup Register Region(BREG) from where the data need to be Restored. Starts with 0, ends with (SRSS_BACKUP_NUM_BREG - 1)
wordDstPointerDestination address from where the backed up words have to be written.
wordSizeNumber of words to be Restored
Note
This API is available for CAT1A (TVIIBE only), CAT1B and CAT1C devices.

◆ Cy_SysPm_SetupDeepSleepRAM()

cy_en_syspm_status_t Cy_SysPm_SetupDeepSleepRAM ( cy_en_syspm_dsram_checks_t  dsramCheck,
uint32_t *  dsramIntState 
)

Implements Pre and Post Deepsleep RAM Setup.

Parameters
dsramCheckCY_SYSPM_PRE_DSRAM or CY_SYSPM_POST_DSRAM
dsramIntStateVariable to save the interrupt state before and after Deepsleep RAM.
Returns
  • CY_SYSPM_SUCCESS - Deepsleep RAM checks are successful
  • CY_SYSPM_CANCELED - Operation was canceled. Call the function again until the function returns CY_SYSPM_SUCCESS.
Note
This API is available for CAT1B devices.

◆ Cy_SysPm_CpuEnterRAMOffDeepSleep()

cy_en_syspm_status_t Cy_SysPm_CpuEnterRAMOffDeepSleep ( void  )

Sets executing CPU to the Deep Sleep mode forceful RAM OFF.

Returns
Entered status, see cy_en_syspm_status_t.
Note
This API is available for CAT1B devices.
This API is not a standard PDL interface, it is a custom defined Power Management State, not to be used by the customers.