1 /* 2 * Copyright (c) 2022-2023, Texas Instruments Incorporated 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * * Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * * Neither the name of Texas Instruments Incorporated nor the names of 17 * its contributors may be used to endorse or promote products derived 18 * from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 /** ============================================================================ 33 * @file BatteryMonitorLPF3.h 34 * 35 * @brief Battery Monitor driver implementation for the LPF3 family 36 * 37 * The Battery Monitor driver on LPF3 is a part of the battery monitoring 38 * system in the Always On domain (AON). It periodically takes measurements of 39 * the supply voltage of the device and will issue interrupts if the configured 40 * upper limit or lower limit is crossed. 41 * 42 * # Supply Voltage Resolution 43 * The battery monitoring system on LPF3 has a resolution of 1/256 V (around 44 * 3.91 mV). The #BatteryMonitor_getVoltage() function will round the voltage 45 * to the nearest mV. For example, if the supply voltage is measured to be 46 * 2003.91 mV, then #BatteryMonitor_getVoltage() will return 2004. 47 * 48 * # Standby Power Mode Behavior # 49 * The supply voltage measurement remains active in standby power mode. 50 * The interrupt used by the battery monitor module is capable of bringing the 51 * device out of standby and into active mode to handle it. That means that 52 * an application will not miss a change in supply voltage just because the device 53 * has transitioned to standby power mode. 54 * While in standby, the supply voltage will only be sampled during a VDDR 55 * recharge pulse. This means that the sampling frequency in standby will be 56 * determined by the temperature as leakage increases with temperature and 57 * requires more frequent recharging of VDDR. 58 */ 59 60 #ifndef ti_drivers_batterymonitor_BatteryMonitorLPF3__include 61 #define ti_drivers_batterymonitor_BatteryMonitorLPF3__include 62 63 #include <stdint.h> 64 #include <stdbool.h> 65 66 #include <ti/drivers/BatteryMonitor.h> 67 68 #ifdef __cplusplus 69 extern "C" { 70 #endif 71 72 #ifdef __cplusplus 73 } 74 #endif 75 76 #endif /* ti_drivers_batterymonitor_BatteryMonitorLPF3__include */