/***************************************************************************//** * \file cy_lvd_ht.h * \version 1.10 * * The header file of the LVD HT driver. * ******************************************************************************** * \copyright * Copyright 2017-2020 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_ht * \{ * The LVD HT driver provides an API to manage the Low Voltage Detection HT block. * * The functions and other declarations used in this driver are in cy_lvd_ht.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 or fault when the observed voltage crosses an adjusted * threshold. * * \section group_lvd_ht_configuration_considerations Configuration Considerations * To set up an LVD, configure the voltage threshold by the * \ref Cy_LVD_HT_SetThreshold function, ensure that the LVD block itself and LVD * interrupt are disabled (by the \ref Cy_LVD_HT_Disable and * \ref Cy_LVD_HT_ClearInterruptMask functions correspondingly) before changing the * threshold to prevent propagating a false interrupt. * Then configure interrupts by the \ref Cy_LVD_HT_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_HT_Enable function, then wait for at least 25us * to get the circuit stabilized and clear the possible false interrupts by the * \ref Cy_LVD_HT_ClearInterrupt, and finally the LVD interrupt can be enabled by * the \ref Cy_LVD_HT_SetInterruptMask function. * * Note : If an LVD is required in Deep Sleep mode, then \ref Cy_LVD_HT_DeepSleepEnable * should be used to enable LVD during Deep Sleep. * * \section group_lvd_ht_more_information More Information * See the LVD chapter of the device technical reference manual (TRM). * * \section group_lvd_ht_changelog Changelog * * * * * * * * * * * * *
VersionChangesReason of Change
1.10Added 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.0Initial Version
* * \defgroup group_lvd_ht_macros Macros * \defgroup group_lvd_ht_functions Functions * \{ * \defgroup group_lvd_ht_functions_syspm_callback Low Power Callback * \} * \defgroup group_lvd_ht_enums Enumerated Types */ #if !defined(CY_LVD_HT_H) #define CY_LVD_HT_H #include "cy_device.h" #if (defined (CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION >= 2)) #include "cy_pra.h" #include "cy_syspm.h" #ifdef __cplusplus extern "C" { #endif /** \addtogroup group_lvd_ht_macros * \{ */ /** The driver major version */ #define CY_LVD_HT_DRV_VERSION_MAJOR 1 /** The driver minor version */ #define CY_LVD_HT_DRV_VERSION_MINOR 10 /** The LVD driver identifier */ #define CY_LVD_HT_ID (CY_PDL_DRV_ID(0x78U)) /** \} group_lvd_ht_macros */ /** \addtogroup group_lvd_ht_enums * \{ */ /** * LVD Selection. */ typedef enum { CY_LVD_HT_SELECT_LVD_1 = 0x1u, /**