55 #ifndef FOXBMS__NXP_MC33775A_DEFS_H_
56 #define FOXBMS__NXP_MC33775A_DEFS_H_
70 #define N775_USE_MUX_FOR_TEMP (true)
72 #define N775_CHECK_MUX_STATE (true)
74 #define N775_CHECK_SUPPLY_CURRENT (false)
76 #define N775_BROADCAST_ADDRESS (63u)
78 #define N775_WAKEUP_TIME_MS (3u)
80 #define N775_TIMEOUT_TO_SLEEP_10MS (200u)
82 #define N775_TIMEOUT_ENABLED (0u)
84 #define N775_TIMEOUT_DISABLED (0x5Au)
86 #define N775_TIMEOUT_SWITCH (N775_TIMEOUT_ENABLED)
88 #define N775_TIME_AFTER_MEASUREMENT_START_MS (5u)
90 #define N775_DEFAULT_CHAIN_ADDRESS (1u)
93 #define N775_MEASUREMENT_CAPTURE_TIME_MS (5u + 1u)
95 #define N775_MEASUREMENT_READY_TIME_MS (1u)
97 #define N775_INVALID_REGISTER_VALUE (0x8000u)
99 #define N775_MUX_SEQUENCE_LENGTH (8u)
102 #define N775_BALPAUSELEN_10US (100u)
107 #define N775_ADG728_ADDRESS_UPPERBITS (0x98u)
109 #define N775_I2C_READ (1u)
111 #define N775_I2C_WRITE (0u)
113 #define N775_I2C_DUMMY_BYTE (0x0u)
115 #define N775_MUXED_TEMP_GPIO_POSITION (0u)
117 #define N775_GLOBAL_BALANCING_TIMER (0xFFFFu)
119 #define N775_PRE_BALANCING_TIMER (0x0u)
121 #define N775_ALL_CHANNEL_BALANCING_TIMER (0xFFFFu)
123 #define N775_GLOBAL_BALANCING_TIMER_VALUE_SET_TO_MAX_AGAIN (0x1000u)
125 #define N775_FLAG_READY_TRIES (5u)
128 #define N775_I2C_FINISHED_TIMEOUT_ms (50u)
262 uint8_t activeStates[12];
312 #ifdef UNITY_UNIT_TEST
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
#define BS_NR_OF_MODULES_PER_STRING
number of modules in a string
N775_PORT_EXPANDER_TI_DIRECTION_e
@ N775_PORT_EXPANDER_TI_OUTPUT
@ N775_PORT_EXPANDER_TI_INPUT
@ N775_ALREADY_INITIALIZED
@ N775_REUSE_READ_VOLTAGE_FOR_ADOW_PDOWN
@ N775_REUSE_READ_VOLTAGE_FOR_ADOW_PUP
N775_STATEMACH_INITIALIZATION_SUB_e
@ N775_EXIT_INITIALIZATION
@ N775_RE_ENTRY_INITIALIZATION
@ N775_ENTRY_INITIALIZATION
@ N775_START_INIT_INITIALIZATION
@ N775_CHECK_INITIALIZATION
@ N775_READ_INITIALIZATION_REGISTER
@ N775_STATE_INITIALIZATION_REQUEST
N775_STATEMACH_UNINITIALIZED_SUB_e
@ N775_ENTRY_UNINITIALIZED
@ N775_STATEMACH_ENUMERATE
@ N775_STATEMACH_BALANCECONTROL
@ N775_STATEMACH_STARTMEAS
@ N775_STATEMACH_READVOLTAGE
@ N775_STATEMACH_INITIALIZED
@ N775_STATEMACH_INITIALIZATION
@ N775_STATEMACH_UNINITIALIZED
Headers for the driver for the SPI module.
N775_STATE_REQUEST_e measVoltageSumOfCells
N775_STATE_REQUEST_e balancing
N775_STATE_REQUEST_e measTemperature
uint8_t numberActiveOfStates
N775_STATE_REQUEST_e measMux
N775_STATE_REQUEST_e accuracyADCverification
N775_STATE_REQUEST_e digitalFilterCheck
N775_STATE_REQUEST_e balancing_feedback
N775_STATE_REQUEST_e measVoltage
N775_STATE_REQUEST_e readEEPROM
N775_STATE_REQUEST_e measVoltage2Cells
N775_STATE_REQUEST_e openWireCheck
N775_STATE_REQUEST_e measAllGpio
N775_STATE_REQUEST_e userIO
N775_STATE_REQUEST_e deviceParameterCheck
N775_ERRORTABLE_s * errorTable
DATA_BLOCK_BALANCING_CONTROL_s * balancingControl
DATA_BLOCK_CELL_TEMPERATURE_s * cellTemperature
DATA_BLOCK_ALL_GPIO_VOLTAGES_s * allGpioVoltage
DATA_BLOCK_OPEN_WIRE_s * openWire
DATA_BLOCK_USER_MUX_s * userMux
N775_SUPPLY_CURRENT_s * supplyCurrent
DATA_BLOCK_SLAVE_CONTROL_s * slaveControl
DATA_BLOCK_MIN_MAX_s * minMax
DATA_BLOCK_CELL_VOLTAGE_s * cellVoltage
DATA_BLOCK_BALANCING_FEEDBACK_s * balancingFeedback
uint32_t nrOfConsecutiveErrors
SPI_INTERFACE_CONFIG_s * pSpiRxSequenceStart
SPI_INTERFACE_CONFIG_s * pSpiTxSequenceStart
bool firstMeasurementMade
SPI_INTERFACE_CONFIG_s * pSpiTxSequence
SPI_INTERFACE_CONFIG_s * pSpiRxSequence