foxBMS
1.2.1
The foxBMS Battery Management System API Documentation
|
Header for the configuration for the MC33775A monitoring chip. More...
Go to the source code of this file.
Macros | |
#define | N775_N_N775 (BS_NR_OF_MODULES) |
#define | N775_NUMBER_OF_N775_PER_MODULE (1u) |
#define | N775_TX_MESSAGE_LENGTH (7u) |
#define | N775_RX_MESSAGE_LENGTH (4u) |
#define | N775_MAX_NUMBER_OF_VOLTAGES (14u) |
#define | N775_TRANSMISSION_TIMEOUT (10u) |
#define | N775_STATEMACH_SHORTTIME (1u) |
#define | N775_TWAKECOM_MS (3u) |
#define | N775_TDWAKE_MS (4u) |
#define | N775_TIME_DAISYCHAIN_WAKEUP_MS (N775_N_N775 * (N775_TWAKECOM_MS + N775_TDWAKE_MS)) |
#define | N775_TIME_BETWEEN_WAKEUP_MS (4u) |
#define | N775_TIME_AFTER_ENUMERATION_MS (1u) |
#define | N775_TRANSMIT_SPIERRLIMIT (3u) |
#define | N775_MAX_N_BYTES_FOR_DATA_RECEPTION (N775_TX_MESSAGE_LENGTH * N775_MAX_NUMBER_OF_VOLTAGES) |
#define | N775_SendData(txbuf, rxbuf, length) SPI_TransmitReceiveDataDma(&spi_nxp775InterfaceTx[0], txbuf, rxbuf, length) |
#define | N775_SPI_HANDLE &spi_devices[0] |
#define | N775_SPI_INSTANCE *N775_SPI_HANDLE.Instance |
#define | N775_SPI_PRESCALER *N775_SPI_HANDLE.Init.BaudRatePrescaler |
Functions | |
float | N775_Convert_MuxVoltages_to_Temperatures (float v_adc_V) |
converts a raw voltage from multiplexer to a temperature value in Celsius. More... | |
Variables | |
const uint8_t | n775_voltage_input_used [BS_MAX_SUPPORTED_CELLS] |
Header for the configuration for the MC33775A monitoring chip.
SPDX-License-Identifier: BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
Definition in file n775_cfg.h.
#define N775_MAX_N_BYTES_FOR_DATA_RECEPTION (N775_TX_MESSAGE_LENGTH * N775_MAX_NUMBER_OF_VOLTAGES) |
Max number of Bytes to be received from daisy-chain This limit is not due to the hardware. It is only to set the length of the receive buffer for DMA.
Definition at line 151 of file n775_cfg.h.
#define N775_MAX_NUMBER_OF_VOLTAGES (14u) |
775A maximum number of cell voltages that can be measured.
Definition at line 89 of file n775_cfg.h.
#define N775_N_N775 (BS_NR_OF_MODULES) |
Number of used N775-ICs
Definition at line 69 of file n775_cfg.h.
#define N775_NUMBER_OF_N775_PER_MODULE (1u) |
Number of N775-ICs per battery module
Definition at line 74 of file n775_cfg.h.
#define N775_RX_MESSAGE_LENGTH (4u) |
775A Rx message length in bytes.
Definition at line 84 of file n775_cfg.h.
#define N775_SendData | ( | txbuf, | |
rxbuf, | |||
length | |||
) | SPI_TransmitReceiveDataDma(&spi_nxp775InterfaceTx[0], txbuf, rxbuf, length) |
Transmit functions
Definition at line 156 of file n775_cfg.h.
#define N775_SPI_HANDLE &spi_devices[0] |
SPI1 is used for communication with N775
Definition at line 101 of file n775_cfg.h.
#define N775_SPI_INSTANCE *N775_SPI_HANDLE.Instance |
SPI1 is used for communication with N775
Definition at line 103 of file n775_cfg.h.
#define N775_SPI_PRESCALER *N775_SPI_HANDLE.Init.BaudRatePrescaler |
SPI1 is used for communication with N775
Definition at line 105 of file n775_cfg.h.
#define N775_STATEMACH_SHORTTIME (1u) |
N775 statemachine short time definition in ms
Definition at line 111 of file n775_cfg.h.
#define N775_TDWAKE_MS (4u) |
N775 Time between two consecutive wake-up messages in ms 4ms in data sheet
Definition at line 123 of file n775_cfg.h.
#define N775_TIME_AFTER_ENUMERATION_MS (1u) |
N775 time after enumeraiton in ms
Definition at line 138 of file n775_cfg.h.
#define N775_TIME_BETWEEN_WAKEUP_MS (4u) |
N775 time between two wake up commands in ms
Definition at line 133 of file n775_cfg.h.
#define N775_TIME_DAISYCHAIN_WAKEUP_MS (N775_N_N775 * (N775_TWAKECOM_MS + N775_TDWAKE_MS)) |
N775 time for daisy-chain to wake-up in ms
Definition at line 128 of file n775_cfg.h.
#define N775_TRANSMISSION_TIMEOUT (10u) |
Timeout in milliseconds added to the transmission time for interrupt-based SPI transmission.
Definition at line 95 of file n775_cfg.h.
#define N775_TRANSMIT_SPIERRLIMIT (3u) |
Maximum number of re-tries in case of SPI error during the communication with daisy chain before going into error state
Definition at line 144 of file n775_cfg.h.
#define N775_TWAKECOM_MS (3u) |
N775 Maximum time from wakeup event to possible communication in ms 2.4ms in data sheet
Definition at line 117 of file n775_cfg.h.
#define N775_TX_MESSAGE_LENGTH (7u) |
775A Tx message length in bytes.
Definition at line 79 of file n775_cfg.h.
float N775_Convert_MuxVoltages_to_Temperatures | ( | float | v_adc_V | ) |
converts a raw voltage from multiplexer to a temperature value in Celsius.
The temperatures are read from NTC elements via voltage dividers. This function implements the look-up table between voltage and temperature, taking into account the NTC characteristics and the voltage divider.
v_adc_V | voltage read from the multiplexer in V |
Definition at line 84 of file n775_cfg.c.
|
extern |
Lookup table to indicate which voltage inpus are used
Definition at line 62 of file n775_cfg.c.