The foxBMS secondary mcu API documentation
batterysystem_cfg.h File Reference

Configuration of the battery system (e.g., number of battery modules, battery cells, temperature sensors) More...

#include "general.h"
Include dependency graph for batterysystem_cfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SECONDARY_OUT_OF_ERROR_STATE   FALSE
 
#define BS_NR_OF_MODULES   1
 
#define BS_NR_OF_BAT_CELLS_PER_MODULE   12
 
#define BS_MAX_SUPPORTED_CELLS   12
 
#define BS_NR_OF_GPIOS_PER_MODULE   5
 
#define BS_N_USER_MUX_PER_LTC   2
 
#define BS_N_MUX_CHANNELS_PER_MUX   8
 
#define BS_LTC6804_USED   FALSE
 
#define BS_LTC6810_USED   FALSE
 
#define BS_LTC6811_USED   TRUE
 
#define BS_LTC6812_USED   FALSE
 
#define BS_LTC6813_USED   FALSE
 
#define BS_NR_OF_TEMP_SENSORS_PER_MODULE   8
 
#define BS_NR_OF_BAT_CELLS   (BS_NR_OF_MODULES * BS_NR_OF_BAT_CELLS_PER_MODULE)
 
#define BS_NR_OF_TEMP_SENSORS   (BS_NR_OF_MODULES * BS_NR_OF_TEMP_SENSORS_PER_MODULE)
 
#define BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR   3
 
#define BS_NR_OF_VOLTAGES_FROM_MCU_ADC   2
 
#define BS_NR_OF_CONTACTORS   6
 
#define BS_SEPARATE_POWERLINES   1
 

Detailed Description

Configuration of the battery system (e.g., number of battery modules, battery cells, temperature sensors)

BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:

″This product uses parts of foxBMS®″

″This product includes parts of foxBMS®″

″This product is derived from foxBMS®″

Author
foxBMS Team
Date
20.02.2017 (date of creation)
Module-prefix BS

This files contains basic macros of the battery system in order to derive needed inputs in other parts of the software. These macros are all depended on the hardware.

Macro Definition Documentation

◆ BS_LTC6804_USED

#define BS_LTC6804_USED   FALSE

◆ BS_LTC6810_USED

#define BS_LTC6810_USED   FALSE

◆ BS_LTC6811_USED

#define BS_LTC6811_USED   TRUE

◆ BS_LTC6812_USED

#define BS_LTC6812_USED   FALSE

◆ BS_LTC6813_USED

#define BS_LTC6813_USED   FALSE

◆ BS_MAX_SUPPORTED_CELLS

#define BS_MAX_SUPPORTED_CELLS   12

◆ BS_N_MUX_CHANNELS_PER_MUX

#define BS_N_MUX_CHANNELS_PER_MUX   8

Number of channels per multiplexer

◆ BS_N_USER_MUX_PER_LTC

#define BS_N_USER_MUX_PER_LTC   2

Number of user multiplexer used per LTC-IC The other type is temperature multiplexer

◆ BS_NR_OF_BAT_CELLS

#define BS_NR_OF_BAT_CELLS   (BS_NR_OF_MODULES * BS_NR_OF_BAT_CELLS_PER_MODULE)

◆ BS_NR_OF_GPIOS_PER_MODULE

#define BS_NR_OF_GPIOS_PER_MODULE   5

◆ BS_NR_OF_TEMP_SENSORS

#define BS_NR_OF_TEMP_SENSORS   (BS_NR_OF_MODULES * BS_NR_OF_TEMP_SENSORS_PER_MODULE)

◆ SECONDARY_OUT_OF_ERROR_STATE

#define SECONDARY_OUT_OF_ERROR_STATE   FALSE

Secondary goes in error state in case of SOA violation. When set to FALSE, secondary remains in error state when the SOA has been violated. When set to TRUE, goes back to stand-by when the violation disappeared.