• Main Page
  • Data Structures
  • Files
  • File List
  • Globals

data_flash.c

Go to the documentation of this file.
00001 //******************************************************************************
00002 //THIS PROGRAM IS PROVIDED "AS IS". TI MAKES NO WARRANTIES OR
00003 //REPRESENTATIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
00004 //INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
00005 //FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
00006 //COMPLETENESS OF RESPONSES, RESULTS AND LACK OF NEGLIGENCE.
00007 //TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET
00008 //POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY
00009 //INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE PROGRAM OR
00010 //YOUR USE OF THE PROGRAM.
00011 //
00012 //IN NO EVENT SHALL TI BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
00013 //CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY
00014 //THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED
00015 //OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN ANY WAY OUT
00016 //OF THIS AGREEMENT, THE PROGRAM, OR YOUR USE OF THE PROGRAM.
00017 //EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF
00018 //REMOVAL OR REINSTALLATION, COMPUTER TIME, LABOR COSTS, LOSS
00019 //OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF
00020 //USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S
00021 //AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF
00022 //YOUR USE OF THE PROGRAM EXCEED FIVE HUNDRED DOLLARS
00023 //(U.S.$500).
00024 //
00025 //Unless otherwise stated, the Program written and copyrighted
00026 //by Texas Instruments is distributed as "freeware".  You may,
00027 //only under TI's copyright in the Program, use and modify the
00028 //Program without any charge or restriction.  You may
00029 //distribute to third parties, provided that you transfer a
00030 //copy of this license to the third party and the third party
00031 //agrees to these terms by its first use of the Program. You
00032 //must reproduce the copyright notice and any other legend of
00033 //ownership on each copy or partial copy, of the Program.
00034 //
00035 //You acknowledge and agree that the Program contains
00036 //copyrighted material, trade secrets and other TI proprietary
00037 //information and is protected by copyright laws,
00038 //international copyright treaties, and trade secret laws, as
00039 //well as other intellectual property laws.  To protect TI's
00040 //rights in the Program, you agree not to decompile, reverse
00041 //engineer, disassemble or otherwise translate any object code
00042 //versions of the Program to a human-readable form.  You agree
00043 //that in no event will you alter, remove or destroy any
00044 //copyright notice included in the Program.  TI reserves all
00045 //rights not specifically granted under this license. Except
00046 //as specifically provided herein, nothing in this agreement
00047 //shall be construed as conferring by implication, estoppel,
00048 //or otherwise, upon you, any license or other right under any
00049 //TI patents, copyrights or trade secrets.
00050 // 
00051 //You may not use the Program in non-TI devices.
00052 //
00053 //This software has been submitted to export control regulations
00054 //The ECCN is EAR99 
00055 //*****************************************************************************
00069 #include "msp430.h"
00070 #include "bq_pack.h"
00071 #include "types.h"
00072 #include "data_flash.h"
00073 
00074 
00075 
00079 //Constant Array that stores the battery pack info on flash memory
00080 const DWORD DATA_FLASH[] = 
00081 {
00082   /*Cell Voltage*/
00083   dCOV_THRESHOLD,                  //COV_THRESHOLD           [mV]
00084   dCOV_RECOVERY_THRESHOLD,         //COV_RECOVERY_THRESHOLD  [mV]
00085   dCOV_TIME,                       //COV_TIME                [100ms]
00086   dCUV_THRESHOLD,                  //CUV_THRESHOLD           [mV]
00087   dCUV_RECOVERY_THRESHOLD,         //CUV_RECOVERY_THRESHOLD  [mV]
00088   dCUV_TIME,                       //CUV_TIME                [100ms]
00089   
00090   /*Temperature*/
00091   dPACK_OVER_TEMP1, //3 PACK_OVER_TEMP1   [st C]
00092   dPACK_OT_TIME1,   //PACK_OT_TIME1       [ms]
00093   dPACK_OVER_TEMP2,  //3 PACK_OVER_TEMP2   [st C]
00094   dPACK_OT_TIME2,   //PACK_OT_TIME2       [ms]
00095   
00096   /*Charge and Discharge*/
00097   dPACK_END_OF_CHARGE_VOLTAGE,     //PACK_END_OF_CHARGE_VOLTAGE    [mV] 
00098   dCC_CV_QUAL_TIME,                //CC_CV_QUAL_TIME               [s]
00099   dPACK_END_OF_DISCHARGE_VOLTAGE,  //PACK_END_OF_DISCHARGE_VOLTAGE [mV] 
00100   dEND_OF_DISCHARGE_QUAL_TIME,     //END_OF_DISCHARGE_QUAL_TIME    [s]
00101   dCHARGE_CURRENT,                 //CHARGE_CURRENT                [mA]
00102   dCHARGE_TAPER_CURRENT,           //CHARGE_TAPER_CURRENT          [mA]
00103   dCHARGE_TAPER_TIME,              //CHARGE_TAPER_TIME             [s]
00104   dMAX_CHARGE_TIME,                //MAX_CHARGE_TIME               [s]
00105   dFULL_DISCHARGE_CLEAR_VOLTS,     //FULL_DISCHARGE_CLEAR_VOLTS    [mV] 
00106   dFULL_CHARGE_CLEAR_VOLTS,        //FULL_CHARGE_CLEAR_VOLTS       [mV] 
00107   dDELTA_CHARGE_V,                 //DELTA_CHARGE_V                [mv]
00108   dCHARGE_DISCHARGE_TIME,          //CHARGE_DISCHARGE_TIME         [s]
00109   dDELTA_DISCHARGE_V,              //DELTA_DISCHARGE_V             [mV]
00110     
00111   /*Safety*/
00112   dSOV_THRESHOLD,                 //SOV_THRESHOLD                 [mV]
00113   dSOV_RECOVERY_THRESHOLD,        //SOV_RECOVERY_THRESHOLD        [mV]
00114   dSOV_TIME,                      //SOV_TIME                      [ms]
00115   
00116   /*Balancing*/
00117   dCELL_IMBALANCE_FAIL_THRESHOLD,    //CELL_IMBALANCE_FAIL_THRESHOLD [mV]
00118   dCELL_IMBALANCE_FAIL_TIME,         //CELL_IMBALANCE_FAIL_TIME      [s]
00119   dBALANCE_TIME,                     //BALANCE_TIME     [s] max value is 63
00120   dBALANCE_VOLTS_THRESHOLD,          //BALANCE_VOLTS_THRESHOLD       [mV]
00121   dMIN_BALANCE_VOLTS,                //MIN_BALANCE_VOLTS             [mV]
00122   dMAX_BALANCE_TIME,                 //MAX_BALANCE_TIME              [s]
00123   
00124 };
00125 
00126 
00134 unsigned short get_u16_value(param_id_t param_id)
00135 {
00136 
00137   return (unsigned short)DATA_FLASH[param_id];
00138 
00139 }
00140 
00148 DWORD get_u32_value(param_id_t param_id)
00149 {
00150   return (DWORD)DATA_FLASH[param_id];  
00151 }
00152 
00153 /*EOF*/

Generated on Fri Dec 17 2010 12:08:30 for Multi-cell Lithium-Ion Battery Manager System using MSP430 and BQ76PL536 by  doxygen 1.7.1