MTB CAT1 Peripheral driver library

General Description

API Reference

 Low Power Callback
 The driver supports SysPm callback for Deep Sleep transition.
 

Functions

__STATIC_INLINE void Cy_LVD_HT_Enable (cy_en_lvd_ht_select_t lvdNum)
 Enables the output of the LVD block when the VDDD voltage crosses the threshold. More...
 
__STATIC_INLINE void Cy_LVD_HT_Disable (cy_en_lvd_ht_select_t lvdNum)
 Disables a particular LVD. More...
 
__STATIC_INLINE void Cy_LVD_HT_SetThreshold (cy_en_lvd_ht_select_t lvdNum, cy_en_lvd_ht_tripsel_t threshold)
 Sets a threshold for monitoring the VDDD voltage. More...
 
__STATIC_INLINE cy_en_lvd_ht_status_t Cy_LVD_HT_GetStatus (cy_en_lvd_ht_select_t lvdNum)
 Returns the status of selected LVD. More...
 
__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptStatus (cy_en_lvd_ht_select_t lvdNum)
 Returns the status of selected LVD's interrupt. More...
 
__STATIC_INLINE void Cy_LVD_HT_ClearInterrupt (cy_en_lvd_ht_select_t lvdNum)
 Clears LVD interrupt. More...
 
__STATIC_INLINE void Cy_LVD_HT_SetInterrupt (cy_en_lvd_ht_select_t lvdNum)
 Triggers the device to generate interrupt for LVD. More...
 
__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptMask (cy_en_lvd_ht_select_t lvdNum)
 Returns the mask value of LVD interrupts. More...
 
__STATIC_INLINE void Cy_LVD_HT_SetInterruptMask (cy_en_lvd_ht_select_t lvdNum)
 Enables LVD interrupts. More...
 
__STATIC_INLINE void Cy_LVD_HT_ClearInterruptMask (cy_en_lvd_ht_select_t lvdNum)
 Disables LVD interrupts. More...
 
__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptStatusMasked (cy_en_lvd_ht_select_t lvdNum)
 Returns the masked interrupt status which is a bitwise AND between the interrupt status and interrupt mask registers. More...
 
__STATIC_INLINE void Cy_LVD_HT_SetInterruptConfig (cy_en_lvd_ht_select_t lvdNum, cy_en_lvd_ht_intr_config_t lvdInterruptConfig)
 Sets a configuration for specified LVD interrupt. More...
 
__STATIC_INLINE void Cy_LVD_HT_DeepSleepEnable (cy_en_lvd_ht_select_t lvdNum)
 Enables selected LVD block during Deep Sleep. More...
 
__STATIC_INLINE void Cy_LVD_HT_DeepSleepDisable (cy_en_lvd_ht_select_t lvdNum)
 Disables selected LVD block during Deep Sleep. More...
 
__STATIC_INLINE void Cy_LVD_HT_SetActionConfig (cy_en_lvd_ht_select_t lvdNum, cy_en_lvd_ht_action_config_t lvdActionConfig)
 Sets a action configuration after LVD block reaches threshold. More...
 
__STATIC_INLINE cy_en_lvd_ht_action_config_t Cy_LVD_HT_GetActionConfig (cy_en_lvd_ht_select_t lvdNum)
 Gets the action configured after LVD reaches threshold. More...
 
__STATIC_INLINE bool Cy_LVD_HT_IsDeepSleepEnabled (cy_en_lvd_ht_select_t lvdNum)
 Checks if LVD HT is enabled during Deep Sleep or not. More...
 

Function Documentation

◆ Cy_LVD_HT_Enable()

__STATIC_INLINE void Cy_LVD_HT_Enable ( cy_en_lvd_ht_select_t  lvdNum)

Enables the output of the LVD block when the VDDD voltage crosses the threshold.

See the Configuration Considerations section for details.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t

◆ Cy_LVD_HT_Disable()

__STATIC_INLINE void Cy_LVD_HT_Disable ( cy_en_lvd_ht_select_t  lvdNum)

Disables a particular LVD.

A low voltage detection interrupt is disabled.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t

◆ Cy_LVD_HT_SetThreshold()

__STATIC_INLINE void Cy_LVD_HT_SetThreshold ( cy_en_lvd_ht_select_t  lvdNum,
cy_en_lvd_ht_tripsel_t  threshold 
)

Sets a threshold for monitoring the VDDD voltage.

To prevent propagating a false interrupt, before changing the threshold ensure that the LVD block itself and LVD interrupt are disabled by the Cy_LVD_HT_Disable and Cy_LVD_HT_ClearInterruptMask functions correspondingly.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
thresholdThreshold selection for Low Voltage Detect circuit, cy_en_lvd_ht_tripsel_t.

◆ Cy_LVD_HT_GetStatus()

__STATIC_INLINE cy_en_lvd_ht_status_t Cy_LVD_HT_GetStatus ( cy_en_lvd_ht_select_t  lvdNum)

Returns the status of selected LVD.

SRSS LVD Status Register (PWR_LVD_STATUS).

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Returns
LVD status, cy_en_lvd_ht_status_t.

◆ Cy_LVD_HT_GetInterruptStatus()

__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptStatus ( cy_en_lvd_ht_select_t  lvdNum)

Returns the status of selected LVD's interrupt.

SRSS Interrupt Register (SRSS_INTR).

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Returns
SRSS Interrupt status

◆ Cy_LVD_HT_ClearInterrupt()

__STATIC_INLINE void Cy_LVD_HT_ClearInterrupt ( cy_en_lvd_ht_select_t  lvdNum)

Clears LVD interrupt.

SRSS Interrupt Register (SRSS_INTR).

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t

◆ Cy_LVD_HT_SetInterrupt()

__STATIC_INLINE void Cy_LVD_HT_SetInterrupt ( cy_en_lvd_ht_select_t  lvdNum)

Triggers the device to generate interrupt for LVD.

SRSS Interrupt Set Register (SRSS_INTR_SET).

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t

◆ Cy_LVD_HT_GetInterruptMask()

__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptMask ( cy_en_lvd_ht_select_t  lvdNum)

Returns the mask value of LVD interrupts.

SRSS Interrupt Mask Register (SRSS_INTR_MASK).

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Returns
SRSS Interrupt Mask value

◆ Cy_LVD_HT_SetInterruptMask()

__STATIC_INLINE void Cy_LVD_HT_SetInterruptMask ( cy_en_lvd_ht_select_t  lvdNum)

Enables LVD interrupts.

Sets the LVD interrupt mask in the SRSS_INTR_MASK register.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t

◆ Cy_LVD_HT_ClearInterruptMask()

__STATIC_INLINE void Cy_LVD_HT_ClearInterruptMask ( cy_en_lvd_ht_select_t  lvdNum)

Disables LVD interrupts.

Clears the LVD interrupt mask in the SRSS_INTR_MASK register.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t

◆ Cy_LVD_HT_GetInterruptStatusMasked()

__STATIC_INLINE uint32_t Cy_LVD_HT_GetInterruptStatusMasked ( cy_en_lvd_ht_select_t  lvdNum)

Returns the masked interrupt status which is a bitwise AND between the interrupt status and interrupt mask registers.

SRSS Interrupt Masked Register (SRSS_INTR_MASKED).

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Returns
SRSS Interrupt Masked value

◆ Cy_LVD_HT_SetInterruptConfig()

__STATIC_INLINE void Cy_LVD_HT_SetInterruptConfig ( cy_en_lvd_ht_select_t  lvdNum,
cy_en_lvd_ht_intr_config_t  lvdInterruptConfig 
)

Sets a configuration for specified LVD interrupt.

HVLVD Configuration Register (PWR_LVD_CTL or PWR_LVD_CTL2).

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
lvdInterruptConfigcy_en_lvd_ht_intr_config_t.

◆ Cy_LVD_HT_DeepSleepEnable()

__STATIC_INLINE void Cy_LVD_HT_DeepSleepEnable ( cy_en_lvd_ht_select_t  lvdNum)

Enables selected LVD block during Deep Sleep.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Note
For enabling, call this API before the system enters first DEEPSLEEP entry, else if we enable in the second or subsequent DEEPSLEEP entries then it might not wake the system from DEEPSLEEP through LVD.

◆ Cy_LVD_HT_DeepSleepDisable()

__STATIC_INLINE void Cy_LVD_HT_DeepSleepDisable ( cy_en_lvd_ht_select_t  lvdNum)

Disables selected LVD block during Deep Sleep.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Note
After Cy_LVD_HT_DeepSleepDisable call, you have to reinitialize LVD according to recommended LVD Init sequence, else it might not wake the system from DEEPSLEEP through LVD after calling Cy_LVD_HT_DeepSleepEnable.

◆ Cy_LVD_HT_SetActionConfig()

__STATIC_INLINE void Cy_LVD_HT_SetActionConfig ( cy_en_lvd_ht_select_t  lvdNum,
cy_en_lvd_ht_action_config_t  lvdActionConfig 
)

Sets a action configuration after LVD block reaches threshold.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
lvdActionConfigcy_en_lvd_ht_action_config_t.

◆ Cy_LVD_HT_GetActionConfig()

__STATIC_INLINE cy_en_lvd_ht_action_config_t Cy_LVD_HT_GetActionConfig ( cy_en_lvd_ht_select_t  lvdNum)

Gets the action configured after LVD reaches threshold.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Returns
cy_en_lvd_ht_action_config_t

◆ Cy_LVD_HT_IsDeepSleepEnabled()

__STATIC_INLINE bool Cy_LVD_HT_IsDeepSleepEnabled ( cy_en_lvd_ht_select_t  lvdNum)

Checks if LVD HT is enabled during Deep Sleep or not.

Parameters
lvdNumSelects the LVD, cy_en_lvd_ht_select_t
Returns
- True if LVD HT is enabled during Deep Sleep, otherwise False.