55 #ifndef FOXBMS__NXP_MC33775A_CFG_H_
56 #define FOXBMS__NXP_MC33775A_CFG_H_
68 #define N775_MAXIMUM_NUMBER_OF_SUPPORTED_CELL_MEASUREMENTS (14u)
70 #if BS_NR_OF_CELL_BLOCKS_PER_MODULE > N775_MAXIMUM_NUMBER_OF_SUPPORTED_CELL_MEASUREMENTS
71 #error "Number of cell blocks per module cannot be higher than maximum number of supported cells per IC"
75 #define N775_I2C_NR_BYTES_FOR_MUX_WRITE (4u)
78 #define N775_I2C_NR_BYTES_TO_SWITCH_TO_READ_FOR_UX_READ (2u)
83 #define N775_NOTIFICATION_TX_INDEX (1u)
87 #define N775_NOTIFICATION_RX_INDEX (2u)
91 #define N775_NO_NOTIFIED_VALUE (0x0u)
95 #define N775_TX_NOTIFIED_VALUE (0x50u)
99 #define N775_RX_NOTIFIED_VALUE (0x60u)
104 #define N775_NOTIFICATION_TX_TIMEOUT_ms (1u)
109 #define N775_NOTIFICATION_RX_TIMEOUT_ms (2u)
114 #define N775_N_N775 (BS_NR_OF_MODULES_PER_STRING)
119 #define N775_NUMBER_OF_N775_PER_MODULE (1u)
124 #define N775_TX_MESSAGE_LENGTH (7u)
129 #define N775_RX_MESSAGE_LENGTH (4u)
135 #define N775_TRANSMISSION_TIMEOUT (10u)
140 #define N775_STATEMACH_SHORTTIME (1u)
146 #define N775_TWAKECOM_MS (3u)
152 #define N775_TDWAKE_MS (4u)
157 #define N775_TIME_DAISYCHAIN_WAKEUP_MS (N775_N_N775 * (N775_TWAKECOM_MS + N775_TDWAKE_MS))
162 #define N775_TIME_BETWEEN_WAKEUP_MS (4u)
167 #define N775_TIME_AFTER_ENUMERATION_MS (1u)
173 #define N775_TRANSMIT_SPIERRLIMIT (3u)
180 #define N775_MAX_N_BYTES_FOR_DATA_RECEPTION (N775_TX_MESSAGE_LENGTH * N775_MAX_NUMBER_OF_VOLTAGES)
185 #define N775_SendData(txbuf, rxbuf, length) SPI_TransmitReceiveDataDma(&spi_nxp775InterfaceTx[0], txbuf, rxbuf, length)
209 #ifdef UNITY_UNIT_TEST
Configuration of the battery system (e.g., number of battery modules, battery cells,...
Headers for the driver for the DMA module.
N775_MUX_CH_CFG_s n775_muxSequence[N775_MUX_SEQUENCE_LENGTH]
int16_t N775_ConvertVoltagesToTemperatures(uint16_t adcVoltage_mV)
converts a raw voltage from multiplexer to a temperature value in deci °C.
Definitions for the driver for the MC33775A analog front-end.
#define N775_MUX_SEQUENCE_LENGTH
Headers for the driver for the SPI module.