MTB CAT1 Peripheral driver library
LVD (Low-Voltage-Detect)

General Description

The LVD driver provides an API to manage the Low Voltage Detection block.

The functions and other declarations used in this driver are in cy_lvd.h. You can include cy_pdl.h to get access to all functions and declarations in the PDL.

The LVD block provides a status of currently observed VDDD voltage and triggers an interrupt when the observed voltage crosses an adjusted threshold.

Configuration Considerations

To set up an LVD, configure the voltage threshold by the Cy_LVD_SetThreshold function, ensure that the LVD block itself and LVD interrupt are disabled (by the Cy_LVD_Disable and Cy_LVD_ClearInterruptMask functions correspondingly) before changing the threshold to prevent propagating a false interrupt. Then configure interrupts by the Cy_LVD_SetInterruptConfig function, do not forget to initialize an interrupt handler (the interrupt source number is srss_interrupt_IRQn). Then enable LVD by the Cy_LVD_Enable function, then wait for at least 20us to get the circuit stabilized and clear the possible false interrupts by the Cy_LVD_ClearInterrupt, and finally the LVD interrupt can be enabled by the Cy_LVD_SetInterruptMask function.

For example:

Note that the LVD circuit is available only in Low Power and Ultra Low Power modes. If an LVD is required in Deep Sleep mode, then the device should be configured to periodically wake up from Deep Sleep using a Deep Sleep wakeup source. This makes sure a LVD check is performed during Low Power or Ultra Low Power modes.

More Information

See the LVD chapter of the device technical reference manual (TRM).

Changelog

VersionChangesReason of Change
1.80 Added new APIs Cy_LVD_SetActionConfig, Cy_LVD_GetActionConfig LVD set and get config APIs added.
1.70 Added support for TRAVEO™ II Body Entry devices.
Changed pre-processor logic so SRSS version 2 is grouped with version 3 instead of version 1.
Code enhancement and support for new devices.
1.60 Added CAT1D device support. Added support for CAT1D family of devices.
1.50 Added CAT1B device support. Added support for CAT1B family of devices.
New APIs Added Added new APIs to set and get the source voltage.
1.40 Added new device support. Added new family of devices.
1.30 Fixed/documented MISRA 2012 violations. MISRA 2012 compliance.
1.20 Updated the following functions for the PSoC 64 devices: Cy_LVD_Enable, Cy_LVD_Disable, Cy_LVD_SetThreshold, Cy_LVD_ClearInterrupt, Cy_LVD_SetInterrupt, Cy_LVD_SetInterruptMask, Cy_LVD_ClearInterruptMask, and Cy_LVD_SetInterruptConfig. Added PSoC 64 device support.
1.10 Flattened the organization of the driver source code into the single source directory and the single include directory. Driver library directory-structure simplification.
Added register access layer. Use register access macros instead of direct register access using dereferenced pointers. Makes register access device-independent, so that the PDL does not need to be recompiled for each supported part number.
1.0.1 Added Low Power Callback section Documentation update and clarification
1.0 Initial Version

API Reference

 Macros
 
 Functions
 
 Enumerated Types