foxBMS - Unit Tests  1.5.0
The foxBMS Unit Tests API Documentation
mxm_basic_defines.h File Reference

Basic defines for the complete Maxim driver. More...

#include "battery_system_cfg.h"
#include <stdint.h>
Include dependency graph for mxm_basic_defines.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MXM_DATA_STORAGE_s
 

Macros

#define MXM_MAXIMUM_NR_OF_MODULES   (32u)
 Maximum number of modules. More...
 
#define MXM_MAXIMUM_NR_OF_CELLS_PER_MODULE   (14u)
 Maximum number of cells per module. More...
 
#define MXM_MAXIMUM_NR_OF_AUX_PER_MODULE   (6u)
 Maximum number of AUX ports per module. More...
 

Enumerations

enum  MXM_MODEL_ID_e {
  MXM_MODEL_ID_NONE = 0u , MXM_MODEL_ID_MAX17852 = 0x852u , MXM_MODEL_ID_MAX17853 = 0x853u , MXM_MODEL_ID_MAX17854 = 0x854u ,
  MXM_MODEL_ID_invalid = 0x1000u
}
 Type of monitoring device. More...
 
enum  MXM_DC_BYTE_e {
  MXM_DC_PEC_ERROR = (1u << 7u) , MXM_DC_ALRTFMEA = (1u << 6u) , MXM_DC_ALRTSTATUS = (1u << 5u) , MXM_DC_AUXOV = (1u << 4u) ,
  MXM_DC_AUXUV = (1u << 3u) , MXM_DC_CELLOV = (1u << 2u) , MXM_DC_CELLUV = (1u << 1u) , MXM_DC_RESERVED = 1u ,
  MXM_DC_EMPTY = 0u
}
 
enum  MXM_SILICON_VERSION_e {
  MXM_SILICON_VERSION_0 = 0x0u , MXM_SILICON_VERSION_1 = 0x1u , MXM_SILICON_VERSION_2 = 0x2u , MXM_SILICON_VERSION_3 = 0x3u ,
  MXM_SILICON_VERSION_4 = 0x4u , MXM_SILICON_VERSION_5 = 0x5u , MXM_SILICON_VERSION_6 = 0x6u , MXM_SILICON_VERSION_7 = 0x7u ,
  MXM_SILICON_VERSION_8 = 0x8u , MXM_SILICON_VERSION_9 = 0x9u , MXM_SILICON_VERSION_10 = 0xAu , MXM_SILICON_VERSION_11 = 0xBu ,
  MXM_SILICON_VERSION_12 = 0xCu , MXM_SILICON_VERSION_13 = 0xDu , MXM_SILICON_VERSION_14 = 0xEu , MXM_SILICON_VERSION_15 = 0xFu ,
  MXM_SILICON_VERSION_INVALID = 0x10u
}
 
enum  MXM_CONVERSION_TYPE_e { MXM_CONVERSION_UNIPOLAR , MXM_CONVERSION_BIPOLAR , MXM_CONVERSION_BLOCK_VOLTAGE }
 
enum  MXM_MEASURE_TYPE_e { MXM_MEASURE_CELL_VOLTAGE , MXM_MEASURE_TEMP , MXM_MEASURE_BLOCK_VOLTAGE }
 

Detailed Description

Basic defines for the complete Maxim driver.

SPDX-License-Identifier: BSD-3-Clause

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
2020-02-11 (date of creation)
Updated
2023-02-03 (date of last update)
Version
v1.5.0
Prefix
MXM

def

Definition in file mxm_basic_defines.h.

Macro Definition Documentation

◆ MXM_MAXIMUM_NR_OF_AUX_PER_MODULE

#define MXM_MAXIMUM_NR_OF_AUX_PER_MODULE   (6u)

Maximum number of AUX ports per module.

Maximum number of AUX ports that can be on one module. This value is given by the hardware and cannot be changed.

Definition at line 91 of file mxm_basic_defines.h.

◆ MXM_MAXIMUM_NR_OF_CELLS_PER_MODULE

#define MXM_MAXIMUM_NR_OF_CELLS_PER_MODULE   (14u)

Maximum number of cells per module.

Maximum number of cells that can be connected to one module. This value is given by the hardware and cannot be changed.

Definition at line 83 of file mxm_basic_defines.h.

◆ MXM_MAXIMUM_NR_OF_MODULES

#define MXM_MAXIMUM_NR_OF_MODULES   (32u)

Maximum number of modules.

Maximum number of modules that can be connected to one UART daisy-chain. This value is defined in the Maxim Battery Management Protocol and cannot be changed.

Definition at line 75 of file mxm_basic_defines.h.

Enumeration Type Documentation

◆ MXM_CONVERSION_TYPE_e

Conversion Type

Enumerator
MXM_CONVERSION_UNIPOLAR 

unipolar measurement

MXM_CONVERSION_BIPOLAR 

bipolar measurement

MXM_CONVERSION_BLOCK_VOLTAGE 

measurement of block voltage

Definition at line 143 of file mxm_basic_defines.h.

◆ MXM_DC_BYTE_e

values that the datacheck byte can assume

Enumerator
MXM_DC_PEC_ERROR 

PEC Error

MXM_DC_ALRTFMEA 

FMEA alert

MXM_DC_ALRTSTATUS 

alert from status register

MXM_DC_AUXOV 

OV or UT on AUX

MXM_DC_AUXUV 

UV or OT on AUX

MXM_DC_CELLOV 

OV on CELLs

MXM_DC_CELLUV 

UV on CELLs

MXM_DC_RESERVED 

reserved

MXM_DC_EMPTY 

empty data-check-byte

Definition at line 109 of file mxm_basic_defines.h.

◆ MXM_MEASURE_TYPE_e

Type of measurement

Enumerator
MXM_MEASURE_CELL_VOLTAGE 

cell voltage measurement

MXM_MEASURE_TEMP 

temperature measurement

MXM_MEASURE_BLOCK_VOLTAGE 

block voltage measurement

Definition at line 150 of file mxm_basic_defines.h.

◆ MXM_MODEL_ID_e

Type of monitoring device.

This enum describes the available types of monitoring devices. These values also align with the register values on the corresponding devices and should therefore not be altered.

Enumerator
MXM_MODEL_ID_NONE 

init value for registry

MXM_MODEL_ID_MAX17852 

monitoring IC MAX17852

MXM_MODEL_ID_MAX17853 

monitoring IC MAX17853

MXM_MODEL_ID_MAX17854 

monitoring IC MAX17854

MXM_MODEL_ID_invalid 

invalid version ID (cannot be encoded in register or unknown value)

Definition at line 100 of file mxm_basic_defines.h.

◆ MXM_SILICON_VERSION_e

valid values for the silicon version of connected monitoring ICs

Enumerator
MXM_SILICON_VERSION_0 

initialization value

MXM_SILICON_VERSION_1 

silicon version 1 (known from data-sheet)

MXM_SILICON_VERSION_2 

silicon version 2

MXM_SILICON_VERSION_3 

silicon version 3

MXM_SILICON_VERSION_4 

silicon version 4 (located on old EV kit 2018)

MXM_SILICON_VERSION_5 

silicon version 5 (located on new EV kit 04.2019)

MXM_SILICON_VERSION_6 

silicon version 6

MXM_SILICON_VERSION_7 

silicon version 7 (most recent as of 2021-11-21)

MXM_SILICON_VERSION_8 

unknown silicon version

MXM_SILICON_VERSION_9 

unknown silicon version

MXM_SILICON_VERSION_10 

unknown silicon version

MXM_SILICON_VERSION_11 

unknown silicon version

MXM_SILICON_VERSION_12 

unknown silicon version

MXM_SILICON_VERSION_13 

unknown silicon version

MXM_SILICON_VERSION_14 

unknown silicon version

MXM_SILICON_VERSION_15 

unknown silicon version

MXM_SILICON_VERSION_INVALID 

due to the register size, no version number can take this value

Definition at line 122 of file mxm_basic_defines.h.