55 #ifndef FOXBMS__NXP_MC33775A_CFG_H_
56 #define FOXBMS__NXP_MC33775A_CFG_H_
68 #define N775_I2C_NR_BYTES_FOR_MUX_WRITE (4u)
71 #define N775_I2C_NR_BYTES_TO_SWITCH_TO_READ_FOR_UX_READ (2u)
77 #define N775_USE_NOTIFICATIONS (true)
82 #define N775_NOTIFICATION_TX_INDEX (1u)
86 #define N775_NOTIFICATION_RX_INDEX (2u)
90 #define N775_NO_NOTIFIED_VALUE (0x0u)
94 #define N775_TX_NOTIFIED_VALUE (0x50u)
98 #define N775_RX_NOTIFIED_VALUE (0x60u)
103 #define N775_NOTIFICATION_TX_TIMEOUT_ms (1u)
108 #define N775_NOTIFICATION_RX_TIMEOUT_ms (2u)
113 #define N775_N_N775 (BS_NR_OF_MODULES_PER_STRING)
118 #define N775_NUMBER_OF_N775_PER_MODULE (1u)
123 #define N775_TX_MESSAGE_LENGTH (7u)
128 #define N775_RX_MESSAGE_LENGTH (4u)
133 #define N775_MAX_NUMBER_OF_VOLTAGES (14u)
139 #define N775_TRANSMISSION_TIMEOUT (10u)
144 #define N775_STATEMACH_SHORTTIME (1u)
150 #define N775_TWAKECOM_MS (3u)
156 #define N775_TDWAKE_MS (4u)
161 #define N775_TIME_DAISYCHAIN_WAKEUP_MS (N775_N_N775 * (N775_TWAKECOM_MS + N775_TDWAKE_MS))
166 #define N775_TIME_BETWEEN_WAKEUP_MS (4u)
171 #define N775_TIME_AFTER_ENUMERATION_MS (1u)
177 #define N775_TRANSMIT_SPIERRLIMIT (3u)
184 #define N775_MAX_N_BYTES_FOR_DATA_RECEPTION (N775_TX_MESSAGE_LENGTH * N775_MAX_NUMBER_OF_VOLTAGES)
189 #define N775_SendData(txbuf, rxbuf, length) SPI_TransmitReceiveDataDma(&spi_nxp775InterfaceTx[0], txbuf, rxbuf, length)
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 monitoring chip.
#define N775_MUX_SEQUENCE_LENGTH
Headers for the driver for the SPI module.