/***************************************************************************//** * \file cy_lvd.h * \version 1.60 * * The header file of the LVD driver. * ******************************************************************************** * \copyright * Copyright (c) (2017-2022), Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of Cypress Semiconductor Corporation. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ /** * \addtogroup group_lvd * \{ * 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. * * \section group_lvd_configuration_considerations Configuration Considerations * To set up an LVD, configure the voltage threshold by the * \ref Cy_LVD_SetThreshold function, ensure that the LVD block itself and LVD * interrupt are disabled (by the \ref Cy_LVD_Disable and * \ref Cy_LVD_ClearInterruptMask functions correspondingly) before changing the * threshold to prevent propagating a false interrupt. * Then configure interrupts by the \ref 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 \ref Cy_LVD_Enable function, then wait for at least 20us * to get the circuit stabilized and clear the possible false interrupts by the * \ref Cy_LVD_ClearInterrupt, and finally the LVD interrupt can be enabled by * the \ref Cy_LVD_SetInterruptMask function. * * For example: * \snippet lvd/snippet/main.c Cy_LVD_Snippet * * 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. * * \section group_lvd_more_information More Information * See the LVD chapter of the device technical reference manual (TRM). * * \section group_lvd_changelog Changelog *
Version | Changes | Reason of Change |
---|---|---|
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 * * Cy_LVD_GetSourceVoltage() * * Cy_LVD_SetSourceVoltage() * | *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: \ref Cy_LVD_Enable, \ref Cy_LVD_Disable, \ref Cy_LVD_SetThreshold, \ref Cy_LVD_ClearInterrupt, \ref Cy_LVD_SetInterrupt, \ref Cy_LVD_SetInterruptMask, \ref Cy_LVD_ClearInterruptMask, and \ref 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 | ** |