PSoC 6 Peripheral Driver Library

General Description

Functions

__STATIC_INLINE void Cy_SysPm_PmicEnable (void)
 Enable the external PMIC controller that supplies Vddd (if present). More...
 
__STATIC_INLINE void Cy_SysPm_PmicDisable (cy_en_syspm_pmic_wakeup_polarity_t polarity)
 Disable the external PMIC controller that supplies Vddd (if present). More...
 
__STATIC_INLINE bool Cy_SysPm_PmicIsEnabled (void)
 This function returns the status of the PMIC controller. More...
 
__STATIC_INLINE void Cy_SysPm_PmicAlwaysEnable (void)
 Enable the external PMIC controller that supplies Vddd (if present) and force active. More...
 
__STATIC_INLINE void Cy_SysPm_PmicEnableOutput (void)
 Enables the PMIC controller output pin. More...
 
__STATIC_INLINE void Cy_SysPm_PmicDisableOutput (void)
 Disables the PMIC controller output pin. More...
 
__STATIC_INLINE bool Cy_SysPm_PmicIsOutputEnabled (void)
 This function returns the status of the PMIC controller output. More...
 
__STATIC_INLINE void Cy_SysPm_PmicLock (void)
 Locks the PMIC control controller register so that no changes can be made. More...
 
__STATIC_INLINE void Cy_SysPm_PmicUnlock (void)
 Unlocks the PMIC control register so that changes can be made. More...
 
__STATIC_INLINE bool Cy_SysPm_PmicIsLocked (void)
 Returns the PMIC controller lock status. More...
 

Function Documentation

◆ Cy_SysPm_PmicEnable()

__STATIC_INLINE void Cy_SysPm_PmicEnable ( void  )

Enable the external PMIC controller that supplies Vddd (if present).

For information about the PMIC controller input and output pins and their assignment in specific devices, refer to the appropriate device TRM.

This function is not effective when the PMIC controller is locked. Call Cy_SysPm_PmicUnlock() before enabling the PMIC.

Function Usage
/* Scenario: There is a need to enable the external PMIC while the PMIC
* controller is already locked
*/

◆ Cy_SysPm_PmicDisable()

__STATIC_INLINE void Cy_SysPm_PmicDisable ( cy_en_syspm_pmic_wakeup_polarity_t  polarity)

Disable the external PMIC controller that supplies Vddd (if present).

This function does not affect the PMIC controller output pin. The PMIC controller input pin has programmable polarity to enable the external PMIC using different input polarities. The PMIC controller is automatically enabled when the input pin polarity and configured polarity match. This function is not effective when the active level of PMIC controller input pin is equal to the configured PMIC controller polarity.

The function is not effective when the PMIC controller is locked. Call Cy_SysPm_PmicUnlock() before enabling the PMIC controller.

Parameters
polarityConfigures the PMIC controller wakeup input pin to be active low or active high. The PMIC will be automatically enabled when the set polarity and the active level of PMIC input pin match. See cy_en_syspm_pmic_wakeup_polarity_t.

The PMIC controller will be enabled automatically by any of RTC alarm or PMIC wakeup events, regardless of the PMIC controller lock state.

Note
Before disabling the PMIC controller, ensure that PMIC input and PMIC output pins are configured correctly to enable expected PMIC operation.
Warning
The PMIC is enabled automatically when you call Cy_SysPm_PmicLock(). To keep the external PMIC disabled, the PMIC controller must remain unlocked.
Do not call Cy_SysPm_PmicDisable(CY_SYSPM_PMIC_POLARITY_LOW) because this is not supported by hardware.

For information about the PMIC controller input and output pins and their assignment in the specific devices, refer to the appropriate device TRM.

Function Usage
/* Scenario: There is a need to disable the external PMIC with an active
* high state is detected on the PMIC controller input.
*/
/* Configure the PMIC controller input pin to be active logic high after
* the PMIC controller is disabled
*/
Cy_GPIO_SetDrivemode(P0_4_PORT, P0_4_PIN, CY_GPIO_DM_PULLUP);
Cy_GPIO_Set(P0_4_PORT, P0_4_PIN);
/* Configure the PMIC controller output pin to be active logic low
* after the PMIC is disabled */
Cy_GPIO_Clr(P0_5_PORT, P0_5_PIN);
{
}

◆ Cy_SysPm_PmicIsEnabled()

__STATIC_INLINE bool Cy_SysPm_PmicIsEnabled ( void  )

This function returns the status of the PMIC controller.

Returns
  • True if the PMIC is enabled.
  • False if the PMIC is disabled.
Function Usage
/* Scenario: There is a need to lock and enable the PMIC controller */
{
}

◆ Cy_SysPm_PmicAlwaysEnable()

__STATIC_INLINE void Cy_SysPm_PmicAlwaysEnable ( void  )

Enable the external PMIC controller that supplies Vddd (if present) and force active.

This is a Write once API. It ensures that the PMIC controller cannot be disabled or polarity changed until a next device reset.

For information about the PMIC controller input and output pins and their assignment in the specific devices, refer to the appropriate device TRM.

Function Usage
/* Scenario: There is a need to enable the signal through the PMIC
* controller output pin
*/

◆ Cy_SysPm_PmicEnableOutput()

__STATIC_INLINE void Cy_SysPm_PmicEnableOutput ( void  )

Enables the PMIC controller output pin.

The function is not effective when the PMIC controller is locked. Call Cy_SysPm_PmicUnlock() before enabling the PMIC controller.

For information about the PMIC controller output pin and its assignment in specific devices, refer to the appropriate device TRM.

Function Usage
/* Scenario: There is a need to enable the PMIC controller output.
* Note that the output logic state of the pmic_output is ignored once
* the Cy_SysPm_PmicEnableOutput() is called.
*/

◆ Cy_SysPm_PmicDisableOutput()

__STATIC_INLINE void Cy_SysPm_PmicDisableOutput ( void  )

Disables the PMIC controller output pin.

When the PMIC controller output pin is disabled and is unlocked, the PMIC controller output pin can be used for the another purpose.

The function has no effect when the PMIC is locked. Call Cy_SysPm_PmicUnlock() before enabling the PMIC.

For information about the PMIC controller output pin and its assignment in specific devices, refer to the appropriate device TRM.

Note
After the PMIC controller output is disabled, the PMIC output pin returns to its GPIO configured state.
Warning
The PMIC controller output is enabled automatically when you call Cy_SysPm_PmicLock(). To keep the PMIC controller output disabled, the PMIC controller must remain unlocked.
Function Usage
/* Scenario: There is a need to disable the PMIC controller output. Note
* that once the Cy_SysPm_PmicDisableOutput() is called, the pmic_output pin
* returns to its GPIO configuration.
*/
/* Configure the pmic_output pin GPIO configuration to Strong Drive, Input
* buffer off and have output active logic state low. This GPIO configuration
* applies after Cy_SysPm_PmicDisableOutput() is called.
*/
Cy_GPIO_Clr(P0_5_PORT, P0_5_PIN);

◆ Cy_SysPm_PmicIsOutputEnabled()

__STATIC_INLINE bool Cy_SysPm_PmicIsOutputEnabled ( void  )

This function returns the status of the PMIC controller output.

Returns
  • True if the PMIC output is enabled.
  • False if the PMIC output is disabled.
Function Usage
/* Scenario: There is a need to disable the external PMIC with an active
* high state is detected on the PMIC controller input.
*/
/* Configure the PMIC controller input pin to be active logic high after
* the PMIC controller is disabled
*/
Cy_GPIO_SetDrivemode(P0_4_PORT, P0_4_PIN, CY_GPIO_DM_PULLUP);
Cy_GPIO_Set(P0_4_PORT, P0_4_PIN);
/* Configure the PMIC controller output pin to be active logic low
* after the PMIC is disabled */
Cy_GPIO_Clr(P0_5_PORT, P0_5_PIN);
{
}

◆ Cy_SysPm_PmicLock()

__STATIC_INLINE void Cy_SysPm_PmicLock ( void  )

Locks the PMIC control controller register so that no changes can be made.

The changes are related to PMIC enabling/disabling and PMIC output pin enabling/disabling.

Warning
The PMIC controller and/or the PMIC output are enabled automatically when you call Cy_SysPm_PmicLock(). To keep the PMIC or PMIC controller output disabled, the PMIC controller must remain unlocked.
Function Usage
/* Scenario: There is a need to lock and enable the PMIC controller */
{
}

◆ Cy_SysPm_PmicUnlock()

__STATIC_INLINE void Cy_SysPm_PmicUnlock ( void  )

Unlocks the PMIC control register so that changes can be made.

The changes are related to the PMIC controller enabling/disabling and PMIC output pin enabling/disabling.

Warning
The PMIC controller and/or the PMIC output are enabled automatically when you call Cy_SysPm_PmicLock(). To keep the PMIC controller or PMIC output disabled, the PMIC must remain unlocked.
Function Usage
/* Scenario: There is a need to enable the external PMIC while the PMIC
* controller is already locked
*/

◆ Cy_SysPm_PmicIsLocked()

__STATIC_INLINE bool Cy_SysPm_PmicIsLocked ( void  )

Returns the PMIC controller lock status.

Returns
  • True if the PMIC is locked.
  • False if the PMIC is unlocked.
Function Usage
/* Scenario: There is a need to lock and enable the PMIC controller */
{
}