55 #ifndef FOXBMS__MXM_CFG_H_
56 #define FOXBMS__MXM_CFG_H_
63 #include "HL_reg_het.h"
70 #define MXM_MAXIMUM_NUMBER_OF_SUPPORTED_CELL_MEASUREMENTS (14u)
72 #if BS_NR_OF_CELL_BLOCKS_PER_MODULE > MXM_MAXIMUM_NUMBER_OF_SUPPORTED_CELL_MEASUREMENTS
73 #error "Number of cell blocks per module cannot be higher than maximum number of supported cells per IC"
80 #define MXM_17841B_GIOPORT (hetREG1)
81 #define MXM_17841B_SHTNDL_PIN (21u)
88 #define MXM_41B_RX_INT_ENABLE_DEFAULT_VALUE (0x00u)
89 #define MXM_41B_TX_INT_ENABLE_DEFAULT_VALUE (0x00u)
90 #define MXM_41B_RX_INT_FLAG_DEFAULT_VALUE (0x00u)
91 #define MXM_41B_TX_INT_FLAG_DEFAULT_VALUE (0x80u)
99 #define MXM_41B_CONFIG_1_DEFAULT_VALUE (0x60u)
105 #define MXM_41B_CONFIG_2_DEFAULT_VALUE (0x10u)
111 #define MXM_41B_CONFIG_3_DEFAULT_VALUE (0x0Fu)
115 #define MXM_MAXIMUM_INIT_TIME_ms (4000u)
182 #ifdef UNITY_UNIT_TEST
Configuration of the battery system (e.g., number of battery modules, battery cells,...
STD_RETURN_TYPE_e MXM_ReceiveData(uint16_t *txBuffer, uint16_t *rxBuffer, uint16_t length)
Send and Receive data over SPI.
const bool mxm_allowSkippingPostInitSelfCheck
void MXM_InitializeMonitoringPins(void)
Initialize the pins connected to the MAX17841B.
STD_RETURN_TYPE_e MXM_GetSPIStateReady(void)
Return whether SPI interface is ready.
void MXM_ShutDownBridgeIc(void)
Pulls the shutdown of the bridge IC low.
void MXM_EnableBridgeIc(void)
Pulls the shutdown of the bridge IC high.
STD_RETURN_TYPE_e MXM_SendData(uint16_t *txBuffer, uint16_t length)
Transmit data over SPI.
Headers for the driver for the SPI module.
Headers for the configuration for the SPI module.