foxBMS  1.1.1
The foxBMS Battery Management System API Documentation
mxm_basic_defines.h File Reference

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

#include "general.h"
#include "battery_system_cfg.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
 

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...
 

Typedefs

typedef enum MXM_MODEL_ID MXM_MODEL_ID_e
 Type of monitoring device. More...
 
typedef enum MXM_DC_BYTE MXM_DC_BYTE_e
 
typedef enum MXM_siliconVersion MXM_siliconVersion_e
 
typedef enum MXM_CONVERSION_TYPE MXM_CONVERSION_TYPE_e
 
typedef enum MXM_MEASURE_TYPE MXM_MEASURE_TYPE_e
 
typedef struct MXM_DATA_STORAGE MXM_DATA_STORAGE_s
 

Enumerations

enum  MXM_MODEL_ID { MXM_MODEL_ID_NONE = 0u , MXM_MODEL_ID_MAX17852 = 0x852u , MXM_MODEL_ID_MAX17853 = 0x853u , MXM_MODEL_ID_MAX17854 = 0x854u }
 Type of monitoring device. More...
 
enum  MXM_DC_BYTE {
  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_siliconVersion {
  MXM_siliconVersion_0 = 0x0u , MXM_siliconVersion_1 = 0x1u , MXM_siliconVersion_2 = 0x2u , MXM_siliconVersion_3 = 0x3u ,
  MXM_siliconVersion_4 = 0x4u , MXM_siliconVersion_5 = 0x5u , MXM_siliconVersion_7 = 0x7u
}
 
enum  MXM_CONVERSION_TYPE { MXM_CONVERSION_UNIPOLAR , MXM_CONVERSION_BIPOLAR , MXM_CONVERSION_BLOCK_VOLTAGE }
 
enum  MXM_MEASURE_TYPE { 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
2020-06-22 (date of last update)
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 89 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 81 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 73 of file mxm_basic_defines.h.

Typedef Documentation

◆ MXM_CONVERSION_TYPE_e

Conversion Type

◆ MXM_DATA_STORAGE_s

struct that summarizes all types of measurement values of the monitoring IC

◆ MXM_DC_BYTE_e

typedef enum MXM_DC_BYTE MXM_DC_BYTE_e

values that the datacheck byte can assume

◆ MXM_MEASURE_TYPE_e

Type of measurement

◆ 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.

◆ MXM_siliconVersion_e

valid values for the silicon version of connected monitoring ICs

Enumeration Type Documentation

◆ MXM_CONVERSION_TYPE

Conversion Type

Enumerator
MXM_CONVERSION_UNIPOLAR 

unipolar measurement

MXM_CONVERSION_BIPOLAR 

bipolar measurement

MXM_CONVERSION_BLOCK_VOLTAGE 

measurement of block voltage

Definition at line 130 of file mxm_basic_defines.h.

◆ MXM_DC_BYTE

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 106 of file mxm_basic_defines.h.

◆ MXM_MEASURE_TYPE

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 137 of file mxm_basic_defines.h.

◆ MXM_MODEL_ID

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

Definition at line 98 of file mxm_basic_defines.h.

◆ MXM_siliconVersion

valid values for the silicon version of connected monitoring ICs

Enumerator
MXM_siliconVersion_0 

initialization value

MXM_siliconVersion_1 

silicon version 1 (known from datasheet)

MXM_siliconVersion_2 

silicon version 2

MXM_siliconVersion_3 

silicon version 3

MXM_siliconVersion_4 

silicon version 4 (located on old EV kit 2018)

MXM_siliconVersion_5 

silicon version 5 (located on new EV kit 04.2019)

MXM_siliconVersion_7 

silicon version 7 (located as Sample on 4-Cell-Boards)

Definition at line 119 of file mxm_basic_defines.h.