.. _program_listing_file_mainboard_Inc_fenice_config.h: Program Listing for File fenice_config.h ======================================== |exhale_lsh| :ref:`Return to documentation for file ` (``mainboard/Inc/fenice_config.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef FENICE_CONFIG_H #define FENICE_CONFIG_H #include //=========================================================================== //=================================== General =============================== //=========================================================================== #define CAN_MAX_PAYLOAD_LENGTH 8 //=========================================================================== //=================================== LTC6813 =============================== //=========================================================================== #define LTC6813_PERIPHERAL hspi1 // Set to 1 to emulate the LTC daisy chain #define LTC6813_EMU 1 #define LTC6813_COUNT 6 #define LTC6813_CELL_COUNT 18 #define LTC6813_REG_COUNT 6 #define LTC6813_REG_CELL_COUNT 3 #define LTC6813_TEMP_ADDRESS 69 //=========================================================================== //================================= Temperature ============================= //=========================================================================== #define TEMP_READ_INTERVAL 100 #define TEMP_SAMPLE_COUNT 4 #define TEMP_BUS_COUNT 1 #define TEMP_STRIPS_PER_BUS 1 #define TEMP_SENSORS_PER_STRIP 6 #define TEMP_SENSOR_COUNT (TEMP_BUS_COUNT * TEMP_STRIPS_PER_BUS * TEMP_SENSORS_PER_STRIP) static const uint8_t TEMP_SENSOR_ADDRESS_CODING[TEMP_SENSORS_PER_STRIP] = {000, 100, 010, 110, 020, 120}; //=========================================================================== //================================ Pack Settings ============================ //=========================================================================== #define PACK_CELL_COUNT (LTC6813_COUNT * LTC6813_CELL_COUNT) #define PACK_TEMP_COUNT (TEMP_SENSOR_COUNT * LTC6813_COUNT) #define PACK_MAX_CURRENT 180.0f #define CELL_WARN_VOLTAGE 28000 #define CELL_MIN_VOLTAGE 25000 #define CELL_MAX_VOLTAGE 42250 #define CELL_MAX_TEMPERATURE 6000 #define CELL_ENERGY_NOMINAL 576 #define PACK_ENERGY_NOMINAL (CELL_ENERGY_NOMINAL * PACK_CELL_COUNT) // @section Balancing #define BAL_MAX_VOLTAGE_THRESHOLD 1000 #define BAL_CYCLE_LENGTH 120000 #define BAL_COOLDOWN_DELAY 5000 /* * If the cli should echo the input */ #define CLI_ECHO 1 #endif /* FENICE_CONFIG_H_ */