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_Enable (void)
 Enables the output of the LVD block when the VDDD voltage is at or below the threshold. More...
 
__STATIC_INLINE void Cy_LVD_Disable (void)
 Disables the LVD block. More...
 
__STATIC_INLINE void Cy_LVD_SetThreshold (cy_en_lvd_tripsel_t threshold)
 Sets a threshold for monitoring the VDDD voltage. More...
 
__STATIC_INLINE cy_en_lvd_status_t Cy_LVD_GetStatus (void)
 Returns the status of LVD. More...
 
__STATIC_INLINE uint32_t Cy_LVD_GetInterruptStatus (void)
 Returns the status of LVD interrupt. More...
 
__STATIC_INLINE void Cy_LVD_ClearInterrupt (void)
 Clears LVD interrupt. More...
 
__STATIC_INLINE void Cy_LVD_SetInterrupt (void)
 Triggers the device to generate interrupt for LVD. More...
 
__STATIC_INLINE uint32_t Cy_LVD_GetInterruptMask (void)
 Returns the mask value of LVD interrupts. More...
 
__STATIC_INLINE void Cy_LVD_SetInterruptMask (void)
 Enables LVD interrupts. More...
 
__STATIC_INLINE void Cy_LVD_ClearInterruptMask (void)
 Disables LVD interrupts. More...
 
__STATIC_INLINE uint32_t Cy_LVD_GetInterruptStatusMasked (void)
 Returns the masked interrupt status which is a bitwise AND between the interrupt status and interrupt mask registers. More...
 
__STATIC_INLINE void Cy_LVD_SetInterruptConfig (cy_en_lvd_intr_config_t lvdInterruptConfig)
 Sets a configuration for LVD interrupt. More...
 
__STATIC_INLINE uint32_t Cy_LVD_GetSourceVoltage (void)
 Returns the index of the source selected. More...
 
__STATIC_INLINE void Cy_LVD_SetSourceVoltage (cy_en_lvd_source_t source)
 Selects the source voltage for LVD. More...
 
__STATIC_INLINE void Cy_LVD_SetActionConfig (cy_en_lvd_action_config_t lvdActionConfig)
 Sets a action configuration after LVD block reaches threshold. More...
 
__STATIC_INLINE cy_en_lvd_action_config_t Cy_LVD_GetActionConfig (void)
 Gets the action configured after LVD reaches threshold. More...
 

Function Documentation

◆ Cy_LVD_Enable()

__STATIC_INLINE void Cy_LVD_Enable ( void  )

Enables the output of the LVD block when the VDDD voltage is at or below the threshold.

See the Configuration Considerations section for details.

◆ Cy_LVD_Disable()

__STATIC_INLINE void Cy_LVD_Disable ( void  )

Disables the LVD block.

A low voltage detection interrupt is disabled.

◆ Cy_LVD_SetThreshold()

__STATIC_INLINE void Cy_LVD_SetThreshold ( cy_en_lvd_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_Disable and Cy_LVD_ClearInterruptMask functions correspondingly.

Parameters
thresholdThreshold selection for Low Voltage Detect circuit, cy_en_lvd_tripsel_t.

◆ Cy_LVD_GetStatus()

__STATIC_INLINE cy_en_lvd_status_t Cy_LVD_GetStatus ( void  )

Returns the status of LVD.

SRSS LVD Status Register (PWR_LVD_STATUS).

Returns
LVD status, cy_en_lvd_status_t.

◆ Cy_LVD_GetInterruptStatus()

__STATIC_INLINE uint32_t Cy_LVD_GetInterruptStatus ( void  )

Returns the status of LVD interrupt.

SRSS Interrupt Register (SRSS_INTR).

Returns
SRSS Interrupt status, CY_LVD_SRSS_INTR_HVLVD1_MASK.

◆ Cy_LVD_ClearInterrupt()

__STATIC_INLINE void Cy_LVD_ClearInterrupt ( void  )

Clears LVD interrupt.

SRSS Interrupt Register (SRSS_INTR).

◆ Cy_LVD_SetInterrupt()

__STATIC_INLINE void Cy_LVD_SetInterrupt ( void  )

Triggers the device to generate interrupt for LVD.

SRSS Interrupt Set Register (SRSS_INTR_SET).

◆ Cy_LVD_GetInterruptMask()

__STATIC_INLINE uint32_t Cy_LVD_GetInterruptMask ( void  )

Returns the mask value of LVD interrupts.

SRSS Interrupt Mask Register (SRSS_INTR_MASK).

Returns
SRSS Interrupt Mask value, CY_LVD_SRSS_INTR_HVLVD1_MASK.

◆ Cy_LVD_SetInterruptMask()

__STATIC_INLINE void Cy_LVD_SetInterruptMask ( void  )

Enables LVD interrupts.

Sets the LVD interrupt mask in the SRSS_INTR_MASK register.

◆ Cy_LVD_ClearInterruptMask()

__STATIC_INLINE void Cy_LVD_ClearInterruptMask ( void  )

Disables LVD interrupts.

Clears the LVD interrupt mask in the SRSS_INTR_MASK register.

◆ Cy_LVD_GetInterruptStatusMasked()

__STATIC_INLINE uint32_t Cy_LVD_GetInterruptStatusMasked ( void  )

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).

Returns
SRSS Interrupt Masked value, CY_LVD_SRSS_INTR_MASKED_HVLVD1_MASK.

◆ Cy_LVD_SetInterruptConfig()

__STATIC_INLINE void Cy_LVD_SetInterruptConfig ( cy_en_lvd_intr_config_t  lvdInterruptConfig)

Sets a configuration for LVD interrupt.

SRSS Interrupt Configuration Register (SRSS_INTR_CFG).

Parameters
lvdInterruptConfigcy_en_lvd_intr_config_t.

◆ Cy_LVD_GetSourceVoltage()

__STATIC_INLINE uint32_t Cy_LVD_GetSourceVoltage ( void  )

Returns the index of the source selected.

Returns
LVD source index, cy_en_lvd_source_t.
Note
This API is available only for CAT1B devices.

◆ Cy_LVD_SetSourceVoltage()

__STATIC_INLINE void Cy_LVD_SetSourceVoltage ( cy_en_lvd_source_t  source)

Selects the source voltage for LVD.

Parameters
sourcecy_en_lvd_source_t.
Note
This API is available only for CAT1B devices.

◆ Cy_LVD_SetActionConfig()

__STATIC_INLINE void Cy_LVD_SetActionConfig ( cy_en_lvd_action_config_t  lvdActionConfig)

Sets a action configuration after LVD block reaches threshold.

Parameters
lvdActionConfigcy_en_lvd_action_config_t.
Note
This API is available only for CAT1D devices.

◆ Cy_LVD_GetActionConfig()

__STATIC_INLINE cy_en_lvd_action_config_t Cy_LVD_GetActionConfig ( void  )

Gets the action configured after LVD reaches threshold.

Returns
cy_en_lvd_action_config_t
Note
This API is available only for CAT1D devices.