Functions

API Reference

group group_lvd_functions

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.

See the Configuration Considerations section for details.

__STATIC_INLINE void Cy_LVD_Disable (void)

Disables the LVD block.

A low voltage detection interrupt is disabled.

__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

__STATIC_INLINE cy_en_lvd_status_t Cy_LVD_GetStatus (void)

Returns the status of LVD.

SRSS LVD Status Register (PWR_LVD_STATUS).

Return

LVD status, cy_en_lvd_status_t.

__STATIC_INLINE uint32_t Cy_LVD_GetInterruptStatus (void)

Returns the status of LVD interrupt.

SRSS Interrupt Register (SRSS_INTR).

Return

SRSS Interrupt status, CY_LVD_SRSS_INTR_HVLVD1_MASK.

__STATIC_INLINE void Cy_LVD_ClearInterrupt (void)

Clears LVD interrupt.

SRSS Interrupt Register (SRSS_INTR).

__STATIC_INLINE void Cy_LVD_SetInterrupt (void)

Triggers the device to generate interrupt for LVD.

SRSS Interrupt Set Register (SRSS_INTR_SET).

__STATIC_INLINE uint32_t Cy_LVD_GetInterruptMask (void)

Returns the mask value of LVD interrupts.

SRSS Interrupt Mask Register (SRSS_INTR_MASK).

Return

SRSS Interrupt Mask value, CY_LVD_SRSS_INTR_HVLVD1_MASK.

__STATIC_INLINE void Cy_LVD_SetInterruptMask (void)

Enables LVD interrupts.

Sets the LVD interrupt mask in the SRSS_INTR_MASK register.

__STATIC_INLINE void Cy_LVD_ClearInterruptMask (void)

Disables LVD interrupts.

Clears the LVD interrupt mask in the SRSS_INTR_MASK register.

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

Return

SRSS Interrupt Masked value, CY_LVD_SRSS_INTR_MASKED_HVLVD1_MASK.

__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