DC2100A  1.2.0
Bi-Directional Cell Balancer Using the LTC3300-1 and the LTC6804-2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Reference Application File for EEPROM Data specific to the LTC6804-2 Battery Monitor on the DC2100A PCB. More...

Go to the source code of this file.

Detailed Description

Reference Application File for EEPROM Data specific to the LTC6804-2 Battery Monitor on the DC2100A PCB.

Definition in file EEPROM.h.

Data Structures

struct  EEPROM_MFG_DATA_TYPE
 Structure containing manufacturing data for one DC2100A PCB. More...
 
struct  EEPROM_CAP_TYPE
 Structure containing capacity data for one DC2100A PCB. More...
 
struct  EEPROM_CURRENT_TYPE
 Structure containing balance current calibration factors for one DC2100A PCB. More...
 

Functions

void Eeprom_Init (void)
 Initializes the EEPROM code module. More...
 
BOOLEAN Eeprom_Reset (int8 board_num, char *reset_key)
 Resets the EEPROM to blank values. More...
 
void Eeprom_Cap_Load (int8 board_num, int8 mfg_key)
 Loads the customer saved or Linear factory calibrated capacity values from EEPROM into global shadow RAM. More...
 
void Eeprom_Cap_Save (int8 board_num, int8 mfg_key)
 Saves the customer saved or Linear factory calibrated capacity values from global shadow RAM into EEPROM. More...
 
void Eeprom_Cap_Load_Defaults (int8 board_num, int8 mfg_key)
 Loads Linear factory calibrated or nominal capacity values. More...
 
void Eeprom_Cap_Save_Defaults (int8 board_num, int8 mfg_key)
 Resets customer saved capacity values to Linear factory calibrated capacity values, or factory calibrated capacity values to nominal. More...
 
void Eeprom_Current_Load (int8 board_num, int8 mfg_key)
 Loads the customer saved or Linear factory calibrated balance current values from EEPROM into global shadow RAM. More...
 
void Eeprom_Current_Save (int8 board_num, int8 mfg_key)
 Saves the customer saved or Linear factory calibrated balance current values from global shadow RAM into EEPROM. More...
 
void Eeprom_Current_Load_Defaults (int8 board_num, int8 mfg_key)
 Loads Linear factory calibrated or nominal balance current values. More...
 
void Eeprom_Current_Save_Defaults (int8 board_num, int8 mfg_key)
 Resets customer saved balance current values to Linear factory calibrated balance current values, or factory calibrated balance current values to nominal. More...
 
BOOLEAN Eeprom_Mfg_Data_Get (int8 board_num, EEPROM_MFG_DATA_TYPE *mfg_data)
 Loads the Manufacturing Board ID Data from EEPROM into global shadow RAM. More...
 
void Eeprom_Mfg_Data_Set (int8 board_num, EEPROM_MFG_DATA_TYPE *mfg_data)
 Saves the Manufacturing Board ID Data from global shadow RAM into EEPROM. More...
 

Macros

EEPROM Keys

Keys used to restrict special operations on the EEPROM.

#define EEPROM_RESET_KEY   "EEPROM_RESET"
 Key allows reset of EEPROM to blank values. More...
 
#define EEPROM_RESET_KEY_SIZE   (sizeof(EEPROM_RESET_KEY) - 1)
 Size of EEPROM_RESET_KEY. More...
 
#define EEPROM_MFG_KEY   0x86
 Key allows access for Linear factory calibrated values. More...
 

Variables

EEPROM_CAP_TYPE Eeprom_cap_values [DC2100A_MAX_BOARDS]
 @ EEPROM Shadow RAMShadow RAM for cell data stored in DC2100A EEPROM. More...
 
EEPROM_CURRENT_TYPE Eeprom_current_values [DC2100A_MAX_BOARDS]
 Copy of balance currents values allows quick balance calculations. More...
 

Function Documentation

void Eeprom_Cap_Load ( int8  board_num,
int8  mfg_key 
)

Loads the customer saved or Linear factory calibrated capacity values from EEPROM into global shadow RAM.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 173 of file EEPROM.c.

void Eeprom_Cap_Load_Defaults ( int8  board_num,
int8  mfg_key 
)

Loads Linear factory calibrated or nominal capacity values.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 229 of file EEPROM.c.

void Eeprom_Cap_Save ( int8  board_num,
int8  mfg_key 
)

Saves the customer saved or Linear factory calibrated capacity values from global shadow RAM into EEPROM.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 203 of file EEPROM.c.

void Eeprom_Cap_Save_Defaults ( int8  board_num,
int8  mfg_key 
)

Resets customer saved capacity values to Linear factory calibrated capacity values, or factory calibrated capacity values to nominal.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 259 of file EEPROM.c.

void Eeprom_Current_Load ( int8  board_num,
int8  mfg_key 
)

Loads the customer saved or Linear factory calibrated balance current values from EEPROM into global shadow RAM.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 188 of file EEPROM.c.

void Eeprom_Current_Load_Defaults ( int8  board_num,
int8  mfg_key 
)

Loads Linear factory calibrated or nominal balance current values.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 244 of file EEPROM.c.

void Eeprom_Current_Save ( int8  board_num,
int8  mfg_key 
)

Saves the customer saved or Linear factory calibrated balance current values from global shadow RAM into EEPROM.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 216 of file EEPROM.c.

void Eeprom_Current_Save_Defaults ( int8  board_num,
int8  mfg_key 
)

Resets customer saved balance current values to Linear factory calibrated balance current values, or factory calibrated balance current values to nominal.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_keyKey allows access for Linear factory calibrated values.

Definition at line 277 of file EEPROM.c.

void Eeprom_Init ( void  )

Initializes the EEPROM code module.

Returns
void

Definition at line 144 of file EEPROM.c.

BOOLEAN Eeprom_Mfg_Data_Get ( int8  board_num,
EEPROM_MFG_DATA_TYPE mfg_data 
)

Loads the Manufacturing Board ID Data from EEPROM into global shadow RAM.

Returns
True if Mfg Board ID Data is valid.
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_dataPointer where read data should be stored.

Definition at line 293 of file EEPROM.c.

void Eeprom_Mfg_Data_Set ( int8  board_num,
EEPROM_MFG_DATA_TYPE mfg_data 
)

Saves the Manufacturing Board ID Data from global shadow RAM into EEPROM.

Returns
void
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
mfg_dataPointer to data to write.

Definition at line 299 of file EEPROM.c.

BOOLEAN Eeprom_Reset ( int8  board_num,
char *  reset_key 
)

Resets the EEPROM to blank values.

Returns
TRUE if the board is reset.
Parameters
board_numThe logical address for the PCB containing this EEPROM data.
reset_keyKey allows reset of EEPROM to blank values.

Definition at line 157 of file EEPROM.c.

Macro Definition Documentation

#define EEPROM_MFG_KEY   0x86

Key allows access for Linear factory calibrated values.

Definition at line 95 of file EEPROM.h.

#define EEPROM_RESET_KEY   "EEPROM_RESET"

Key allows reset of EEPROM to blank values.

Definition at line 93 of file EEPROM.h.

#define EEPROM_RESET_KEY_SIZE   (sizeof(EEPROM_RESET_KEY) - 1)

Size of EEPROM_RESET_KEY.

Definition at line 94 of file EEPROM.h.

Variable Documentation

EEPROM_CAP_TYPE Eeprom_cap_values[DC2100A_MAX_BOARDS]

@ EEPROM Shadow RAMShadow RAM for cell data stored in DC2100A EEPROM.

Copy of capacity value allows quick SOC calculations.

Definition at line 122 of file EEPROM.c.

EEPROM_CURRENT_TYPE Eeprom_current_values[DC2100A_MAX_BOARDS]

Copy of balance currents values allows quick balance calculations.

Definition at line 123 of file EEPROM.c.