foxBMS - Unit Tests  1.4.1
The foxBMS Unit Tests API Documentation
mxm_1785x_tools.h
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file mxm_1785x_tools.h
44  * @author foxBMS Team
45  * @date 2020-07-15 (date of creation)
46  * @updated 2022-10-27 (date of last update)
47  * @version v1.4.1
48  * @ingroup DRIVERS
49  * @prefix MXM
50  *
51  * @brief This is a collection of helper functions for the MAX1785x ICs
52  *
53  * @details This collection of helper functions for the MAX1785x ICs helps to
54  * calculate the lsb and msb for register values and similar tasks.
55  *
56  */
57 
58 #ifndef FOXBMS__MXM_1785X_TOOLS_H_
59 #define FOXBMS__MXM_1785X_TOOLS_H_
60 
61 /*========== Includes =======================================================*/
62 #include "mxm_cfg.h"
63 
64 #include "database.h"
65 #include "mxm_basic_defines.h"
66 #include "mxm_battery_management.h"
67 #include "mxm_register_map.h"
68 
69 /*========== Macros and Definitions =========================================*/
70 /**
71  * @brief States of the global Maxim state-machine
72  *
73  * State transitions are currently autonomous and will have to be integrated into
74  * the Battery System state-machine.
75  */
76 typedef enum {
77  MXM_STATEMACHINE_STATES_UNINITIALIZED, /*!< uninitialized state */
78  MXM_STATEMACHINE_STATES_SELFCHECK_PRE_INIT, /*!< self-check that has to be executed before initialization */
79  MXM_STATEMACHINE_STATES_INIT, /*!< initialization sequence */
80  MXM_STATEMACHINE_STATES_SELFCHECK_POST_INIT, /*!< self-check that has to be executed after initialization */
81  MXM_STATEMACHINE_STATES_IDLE, /*!< idle state, the driver waits for operation here */
82  MXM_STATEMACHINE_STATES_OPERATION, /*!< operating state, the measurement cycle is executed here */
83  MXM_STATEMACHINE_STATES_MAXSTATE, /*!< highest state */
85 
86 /** states of the #MXM_StateMachineOperation() statemachine */
87 typedef enum {
165 
166 /** intermediate state-definition for #MXM_MonGetVoltages() */
167 typedef enum {
168  MXM_MONITORING_STATE_PENDING, /*!< state completion is pending */
169  MXM_MONITORING_STATE_PASS, /*!< state passed successfully */
171 
172 /**
173  * struct describing the different return values of selfchecks that the driver can execute
174  */
175 typedef struct {
176  STD_RETURN_TYPE_e crc; /*!< CRC self-check; stores the return value of #MXM_CRC8SelfTest(). */
177  STD_RETURN_TYPE_e conv; /*!< Conversion self-check; stores the return value of #MXM_ConvertTest(). */
178  STD_RETURN_TYPE_e firstSetBit; /*!< First Set Bit self-check; stores the return value of #MXM_FirstSetBitTest(). */
180  extractValueFromRegister; /*!< Extract value from Register self-check; stores the return value of #MXM_ExtractValueFromRegisterTest(). */
182  parseVoltageReadall; /*!< Voltage parsing of READALL; stores the return value of #MXM_ParseVoltageReadallTest(). */
184  addressSpaceChecker; /*!< Address space checker; stores the return value of #MXM_5XUserAccessibleAddressSpaceCheckerSelfCheck(). */
186  fmeaStatusASCI; /*!< MAX17841B FMEA register; stores the value of the FMEA check conducted in the state #MXM_STATEMACH_41B_CHECK_FMEA. */
188 
189 /* TODO implement filling of values */
190 /* TODO read and verify OTP register */
191 
192 /** struct describing an entry into the monitoring registry */
193 typedef struct {
194  bool connected; /*!< state variable, indicates whether monitoring IC is connected */
195  uint8_t deviceAddress; /*!< address that has been assigned during enumeration */
196  MXM_MODEL_ID_e model; /*!< model (e.g. 17853) */
197  MXM_SILICON_VERSION_e siliconVersion; /*!< silicon version of chip */
198  uint32_t deviceID; /*!< 24-bit unique device ID */
199  uint16_t registerStatus1; /*!< content of the STATUS1 register */
200  uint16_t registerStatus2; /*!< content of the STATUS2 register */
201  uint16_t registerStatus3; /*!< content of the STATUS3 register */
202  uint16_t registerFmea1; /*!< content of the FMEA1 register */
203  uint16_t registerFmea2; /*!< content of the FMEA2 register */
204  uint16_t registerBalstat; /*!< content of the BALSTAT register */
206 
207 /**
208  * @brief Length of RX buffer
209  * @details This define describes the length of the array
210  * #MXM_MONITORING_INSTANCE_s::rxBuffer. It is large enough to fit the largest
211  * message that can be written into a single buffer which consists of
212  * 6 command bytes and #MXM_MAXIMUM_NR_OF_MODULES times 2 receive
213  * bytes for the maximum number of connected monitoring ICs.
214  */
215 #define MXM_RX_BUFFER_LENGTH (100u)
216 
217 /** struct that contains the state of the balancing subsystem */
218 typedef struct {
219  uint8_t moduleBalancingIndex; /*!< index of the module that is currently handled */
220  bool evenCellsNeedBalancing; /*!< indicates that even cells need balancing */
221  bool oddCellsNeedBalancing; /*!< indicates that odd cells need balancing */
222  bool evenCellsBalancingProcessed; /*!< balancing of even cells has been processed */
223  bool oddCellsBalancingProcessed; /*!< balancing of odd cells has been processed */
224  uint16_t cellsToBalance; /*!< bitfield used for register BALSWCTRL, 16 bits for upt to 14 cells */
225  uint32_t previousTimeStamp; /*!< timestamp of previous balancing checkpoint */
226  uint32_t currentTimeStamp; /*!< timestamp of current balancing checkpoint */
227  DATA_BLOCK_BALANCING_CONTROL_s *const pBalancingControl_table; /*!< balancing control table */
229 
230 /** Status of the Maxim-main-state-machine. */
231 typedef struct {
232  bool resetNecessary; /*!< a reset of the whole driver is requested (due to an error) */
233  uint8_t errorCounter; /*!< counts the number of errors and issues a reset when the counter trips */
234  uint32_t timestampLastError; /*!< timestamp of last error counter increment; will be reset if old enough */
235  uint32_t timestampInit; /*!< timestamp of the moment that init has been initialized */
236  MXM_STATEMACHINE_STATES_e state; /*!< state of the maxim state-machine */
237  MXM_STATEMACHINE_OPERATION_STATES_e operationSubstate; /*!< substate during operation of monitoring */
238  bool allowStartup; /*!< indicates whether start of state-machine has been requested */
239  bool operationRequested; /*!< indicates whether the measurement cycle should run */
240  bool firstMeasurementDone; /*!< this bit is set after the first measurement cycle */
241  bool stopRequested; /*!< indicates that no new measurement cycles should be run */
242  bool openwireRequested; /*!< indicates that an openwire-check has been requested */
243  bool undervoltageAlert; /*!< whether undervoltage alert has occurred. TODO remove? replaced by DC? */
244  uint8_t muxCounter; /*!< counter for the currently selected mux channel */
245  uint8_t diagnosticCounter; /*!< upward counter for determining when a diagnostic cycle should be entered */
246  MXM_DC_BYTE_e dcByte; /*!< content of the data-check-byte */
247  uint8_t mxmVoltageCellCounter; /*!< counter for getting all cell voltages */
248  uint8_t highest5xDevice; /*!< address of highest monitoring device of the 5x family */
249  MXM_5X_STATE_REQUEST_STATUS_e requestStatus5x; /*!< status of request to 5x */
250  MXM_5X_COMMAND_PAYLOAD_s batteryCmdBuffer; /*!< buffer for Battery Management Commands */
251  STD_RETURN_TYPE_e resultSelfCheck; /*!< Status of driver-wide self-check */
252  MXM_SELFCHECK_s selfCheck; /*!< stores self check return values */
253  MXM_BALANCING_STATE_s *const pBalancingState; /*!< pointer to the balancing structure */
254  MXM_41B_INSTANCE_s *const pInstance41B; /*!< instance-pointer of the 41b-state-machine */
255  MXM_5X_INSTANCE_s *const pInstance5X; /*!< instance-pointer of the 5x-state-machine */
256  DATA_BLOCK_CELL_VOLTAGE_s *const pCellVoltages_table; /*!< cell voltages table */
257  DATA_BLOCK_CELL_TEMPERATURE_s *const pCellTemperatures_table; /*!< cell temperatures table */
258  DATA_BLOCK_OPEN_WIRE_s *const pOpenwire_table; /*!< open wire table */
259  /**
260  * @brief Local storage for cell-voltages
261  *
262  * This local variable stores the measured cell- and AUX-voltages. Independent
263  * of the actual configuration, it stores the measurement values always at the
264  * same place and never changes in size.
265  * As an example the voltage of cell 5 (cells are numbered from 1 to 14)
266  * in module 0 (modules are numbered from 0 to 31) will be in entry 4.
267  * The voltage of cell 14 of module 1 will be in entry 27. This is independent
268  * of the size of the setup which is defined in the defines
269  * #BS_NR_OF_CELL_BLOCKS_PER_MODULE and #BS_NR_OF_MODULES_PER_STRING.
270  * Therefore, the size of the arrays inside this struct is defined as
271  * #MXM_MAXIMUM_NR_OF_MODULES times #MXM_MAXIMUM_NR_OF_CELLS_PER_MODULE.
272  */
274  MXM_REGISTRY_ENTRY_s registry[MXM_MAXIMUM_NR_OF_MODULES]; /*!< registry for connected monitoring ICs */
275  uint8_t rxBuffer[MXM_RX_BUFFER_LENGTH]; /*!< buffer that stores the incoming data from the lower state-machines.
276  It contains the command sequence as it is received on the ASCI together with the Battery Management Protocol command. */
278 
279 /*========== Extern Constant and Variable Declarations ======================*/
280 
281 /*========== Extern Function Prototypes =====================================*/
282 /**
283  * @brief Convert a measurement value to a voltage value.
284  * @details This function converts measurement values from the monitoring
285  * IC into a voltage value. It assumes that measurement values are
286  * spread over the LSB and MSB according to the data sheet. This
287  * means that the two lowest bits are 0 and the 14-bit measurement
288  * is spread over the 14 highest bits.
289  *
290  * The conversion type describes the kind of measurement that has
291  * been executed.
292  * @param[in] lsb LSB of the value
293  * @param[in] msb MSB of the value
294  * @param[out] pTarget pointer in which the converted value
295  * shall be written
296  * @param[in] convType type of conversion (bipolar or unipolar)
297  * @param[in] fullScaleReference_mV reference voltage of full scale
298  * (for voltage measurements 5000)
299  */
300 extern void MXM_Convert(
301  uint8_t lsb,
302  uint8_t msb,
303  uint16_t *pTarget,
304  MXM_CONVERSION_TYPE_e convType,
305  uint32_t fullScaleReference_mV);
306 
307 /**
308  * @brief Test the #MXM_Convert()-function.
309  * @details This test-function is intended as a self-check. It tests whether
310  * the #MXM_Convert()-function computes the values as expected.
311  * @return #STD_OK on successful execution, otherwise #STD_NOT_OK
312  */
314 
315 /**
316  * @brief Extract a value from a single register.
317  * @details This function extracts a single value from a single register.
318  * The register has to be supplied as MSB and LSB. The bitmask has to
319  * be of type #MXM_REG_BM. The extracted value will be written into
320  * value.
321  *
322  * The function can only extract values from single registers
323  * (MSB and LSB)and does not handle values that span multiple
324  * registers.
325  * @param[in] lsb least significant byte of the register
326  * @param[in] msb most significant byte of the register
327  * @param[in] bitmask bitmask for the value
328  * @param[out] pValue pointer to a variable in which the value
329  * should be written
330  */
331 extern void MXM_ExtractValueFromRegister(uint8_t lsb, uint8_t msb, MXM_REG_BM bitmask, uint16_t *pValue);
332 
333 /**
334  * @brief Test #MXM_ExtractValueFromRegister().
335  * @details Self-check that tests whether #MXM_ExtractValueFromRegister() works
336  * as expected.
337  * @return #STD_OK if the self-check has passed successfully
338  */
340 
341 /**
342  * @brief Test #MXM_FirstSetBit().
343  * @details Tests the function #MXM_FirstSetBit() if it works as expected.
344  * @return #STD_OK if the self-check has passed successfully
345  */
347 
348 /**
349  * @brief convert a unipolar 14bit-value and shifts it into the 16bit-format
350  * @details Takes a value in the unipolar 14bit format and transforms it into
351  * a 16bit register entry for the monitoring IC (separated into LSB
352  * and MSB).
353  * @param[in] inputValue unipolar 14bit-value
354  * @param[out] lsb LSB in 16bit-format
355  * @param[out] msb MSB in 16bit-format
356  */
357 extern void MXM_Unipolar14BitInto16Bit(uint16_t inputValue, uint8_t *lsb, uint8_t *msb);
358 
359 /**
360  * @brief convert a voltage value into a unipolar 14bit value
361  * @details Takes a voltage value in mV together with a reference for fullscale
362  * values into a unipolar 14bit value.
363  * @param[in] voltage_mV voltage in mV
364  * @param[in] fullscaleReference_mV value of the fullscale in mV;
365  * typically 5000
366  * @return unipolar 14bit value for usage with
367  * #MXM_Unipolar14BitInto16Bit()
368  */
369 extern uint16_t MXM_VoltageIntoUnipolar14Bit(uint16_t voltage_mV, uint16_t fullscaleReference_mV);
370 
371 /**
372  * @brief Get the string and module number from a global module number
373  * @details Maxim driver knows only one string internally and maps on demand
374  * this one string onto several strings (for instances where several
375  * modules are in the same daisy-chain but belong to different
376  * strings).
377  *
378  * This function assumes that a string contains #BS_NR_OF_MODULES_PER_STRING modules
379  * in #BS_NR_OF_STRINGS strings and that they are connected in
380  * a daisy-chain.
381  * @param[in] moduleNumber number of the module in the daisy-chain (starts with 0)
382  * @param[out] pStringNumber pointer where the string number will be written
383  * @param[out] pModuleNumberInString module number in the string
384  */
385 extern void MXM_ConvertModuleToString(
386  const uint16_t moduleNumber,
387  uint8_t *pStringNumber,
388  uint16_t *pModuleNumberInString);
389 
390 /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/
391 
392 #endif /* FOXBMS__MXM_1785X_TOOLS_H_ */
Database module header.
STD_RETURN_TYPE_e
Definition: fstd_types.h:81
#define GEN_MUST_CHECK_RETURN
Allows functions to generate warnings in GCC for unused returns.
Definition: general.h:88
void MXM_Unipolar14BitInto16Bit(uint16_t inputValue, uint8_t *lsb, uint8_t *msb)
convert a unipolar 14bit-value and shifts it into the 16bit-format
void MXM_ConvertModuleToString(const uint16_t moduleNumber, uint8_t *pStringNumber, uint16_t *pModuleNumberInString)
Get the string and module number from a global module number.
STD_RETURN_TYPE_e GEN_MUST_CHECK_RETURN MXM_ConvertTest(void)
Test the MXM_Convert()-function.
STD_RETURN_TYPE_e GEN_MUST_CHECK_RETURN MXM_ExtractValueFromRegisterTest(void)
Test MXM_ExtractValueFromRegister().
MXM_MONITORING_STATE_e
@ MXM_MONITORING_STATE_PASS
@ MXM_MONITORING_STATE_PENDING
uint16_t MXM_VoltageIntoUnipolar14Bit(uint16_t voltage_mV, uint16_t fullscaleReference_mV)
convert a voltage value into a unipolar 14bit value
void MXM_Convert(uint8_t lsb, uint8_t msb, uint16_t *pTarget, MXM_CONVERSION_TYPE_e convType, uint32_t fullScaleReference_mV)
Convert a measurement value to a voltage value.
MXM_STATEMACHINE_OPERATION_STATES_e
@ MXM_INIT_I2C_GET_STAT1
@ MXM_OP_DIAGNOSTIC_CLEAR_FMEA1
@ MXM_INIT_BALEXP5
@ MXM_OP_WRITE_MUX0
@ MXM_INIT_BALEXP6
@ MXM_OP_DIAGNOSTIC_FMEA2
@ MXM_OP_BAL_CONTROL_STOP_BALANCING
@ MXM_INIT_STATUS1
@ MXM_INIT_BALEXP13
@ MXM_INIT_OVTHSETREG
@ MXM_INIT_BALEXP1
@ MXM_INIT_BALEXP9
@ MXM_OP_PINOPEN_RESTORE_CURRENT_SOURCE_CONF
@ MXM_INIT_SET_STATUS2
@ MXM_OP_DIAGNOSTIC_FMEA1
@ MXM_INIT_I2C_SEND_MUX1
@ MXM_INIT_MEASUREEN1
@ MXM_OP_PINOPEN_SET_CURRENT_SOURCES
@ MXM_INIT_GET_ID2
@ MXM_INIT_MEASUREEN2
@ MXM_OP_PINOPEN_GET_SCAN_STROBE
@ MXM_OP_DIAGNOSTIC_CLEAR_STATUS2
@ MXM_INIT_I2C_PNTR
@ MXM_OP_BAL_START
@ MXM_INIT_BALEXP8
@ MXM_INIT_UVTHSETREG
@ MXM_OP_PINOPEN_COMPSCAN
@ MXM_INIT_I2C_SEND_MUX0
@ MXM_INIT_BALSWDLY
@ MXM_INIT_GET_VERSION
@ MXM_OP_DIAGNOSTIC_CLEAR_FMEA2
@ MXM_OP_BAL_CONTROL_SET_ALL
@ MXM_INIT_ENTRY
@ MXM_OP_BAL_READ_BALSTAT
@ MXM_INIT_GET_ID1
@ MXM_OP_DIAGNOSTIC_EXIT
@ MXM_OP_DIAGNOSTIC_STATUS1
@ MXM_INIT_GET_I2C_STAT2
@ MXM_OP_PINOPEN_EXIT
@ MXM_OP_PINOPEN_ENTRY
@ MXM_OP_PINOPEN_PROCESS_OPENWIRE
@ MXM_INIT_BALEXP10
@ MXM_INIT_BALEXP14
@ MXM_INIT_BALEXP12
@ MXM_OP_INCREMENT_MUX_COUNTER
@ MXM_OP_BAL_EXIT
@ MXM_OP_PARSE_VOLTAGES_INTO_DB
@ MXM_INIT_I2C_CFG
@ MXM_INIT_ALRTUVEN
@ MXM_INIT_BALEXP3
@ MXM_OP_SELECT_MUX_CHANNEL
@ MXM_INIT_BALEXP2
@ MXM_OP_WRITE_MUX1
@ MXM_INIT_ALRTOVEN
@ MXM_OP_ENTRY_STATE
@ MXM_INIT_BALEXP7
@ MXM_INIT_DEVCFG2
@ MXM_OP_CYCLE_END_EXIT
@ MXM_OP_GET_VOLTAGES
@ MXM_OP_GET_ALRTSUM
@ MXM_OP_CYCLE_END_ENTRY
@ MXM_OP_BAL_CONTROL_RESET_ALL
@ MXM_OP_BAL_ENTRY
@ MXM_INIT_ACQCFG
@ MXM_INIT_COMPOPNTHREG
@ MXM_OP_PINOPEN_GET_ALRT
@ MXM_OP_DIAGNOSTIC_STATUS2
@ MXM_INIT_BALEXP4
@ MXM_OP_DIAGNOSTIC_STATUS3
@ MXM_OP_SET_SCAN_STROBE
@ MXM_OP_GET_SCAN_STROBE
@ MXM_INIT_DEVCFG1
@ MXM_INIT_BALEXP11
@ MXM_INIT_AUXTIMEREG
@ MXM_INIT_AUXGPIOCFG
@ MXM_OP_DIAGNOSTIC_ENTRY
MXM_STATEMACHINE_STATES_e
States of the global Maxim state-machine.
@ MXM_STATEMACHINE_STATES_OPERATION
@ MXM_STATEMACHINE_STATES_INIT
@ MXM_STATEMACHINE_STATES_SELFCHECK_POST_INIT
@ MXM_STATEMACHINE_STATES_UNINITIALIZED
@ MXM_STATEMACHINE_STATES_IDLE
@ MXM_STATEMACHINE_STATES_SELFCHECK_PRE_INIT
@ MXM_STATEMACHINE_STATES_MAXSTATE
STD_RETURN_TYPE_e GEN_MUST_CHECK_RETURN MXM_FirstSetBitTest(void)
Test MXM_FirstSetBit().
#define MXM_RX_BUFFER_LENGTH
Length of RX buffer.
void MXM_ExtractValueFromRegister(uint8_t lsb, uint8_t msb, MXM_REG_BM bitmask, uint16_t *pValue)
Extract a value from a single register.
Basic defines for the complete Maxim driver.
MXM_SILICON_VERSION_e
MXM_MODEL_ID_e
Type of monitoring device.
MXM_DC_BYTE_e
MXM_CONVERSION_TYPE_e
#define MXM_MAXIMUM_NR_OF_MODULES
Maximum number of modules.
Headers for the driver for the MAX17841B ASCI and MAX1785x monitoring chip.
MXM_5X_STATE_REQUEST_STATUS_e
Request status of Battery Management Protocol states.
Header for the configuration for the Maxim monitoring chip.
Register map of the MAX1785x monitoring IC.
uint16_t MXM_REG_BM
Type for register access for monitoring ICs.
Struct for the state-variable of state-machine.
Definition: mxm_17841b.h:158
5x statemachine structure
DATA_BLOCK_BALANCING_CONTROL_s *const pBalancingControl_table
MXM_5X_COMMAND_PAYLOAD_s batteryCmdBuffer
MXM_41B_INSTANCE_s *const pInstance41B
STD_RETURN_TYPE_e resultSelfCheck
MXM_STATEMACHINE_OPERATION_STATES_e operationSubstate
MXM_BALANCING_STATE_s *const pBalancingState
MXM_STATEMACHINE_STATES_e state
MXM_5X_INSTANCE_s *const pInstance5X
MXM_5X_STATE_REQUEST_STATUS_e requestStatus5x
MXM_DATA_STORAGE_s localVoltages
Local storage for cell-voltages.
DATA_BLOCK_OPEN_WIRE_s *const pOpenwire_table
DATA_BLOCK_CELL_VOLTAGE_s *const pCellVoltages_table
DATA_BLOCK_CELL_TEMPERATURE_s *const pCellTemperatures_table
MXM_SILICON_VERSION_e siliconVersion
uint16_t registerStatus2
uint16_t registerStatus3
uint32_t deviceID
uint16_t registerFmea2
uint8_t deviceAddress
MXM_MODEL_ID_e model
uint16_t registerStatus1
uint16_t registerBalstat
uint16_t registerFmea1
bool connected
STD_RETURN_TYPE_e firstSetBit
STD_RETURN_TYPE_e parseVoltageReadall
STD_RETURN_TYPE_e fmeaStatusASCI
STD_RETURN_TYPE_e crc
STD_RETURN_TYPE_e extractValueFromRegister
STD_RETURN_TYPE_e addressSpaceChecker
STD_RETURN_TYPE_e conv
uint16_t rxBuffer[100]