56 #ifndef FOXBMS__SPI_CFG_H_
57 #define FOXBMS__SPI_CFG_H_
70 #define SPI_SPI1_INDEX (0u)
71 #define SPI_SPI2_INDEX (1u)
72 #define SPI_SPI3_INDEX (2u)
73 #define SPI_SPI4_INDEX (3u)
74 #define SPI_SPI5_INDEX (4u)
78 #define SPI_CSHOLD_BIT (0x10000000u)
81 #define SPI_WDEL_BIT (0x04000000u)
84 #define SPI_HARDWARE_CHIP_SELECT_FIELD_POSITION (16u)
87 #define SPI_DATA_FORMAT_FIELD_POSITION (24u)
90 #define SPI_TX_BUFFER_EMPTY_FLAG_POSITION (9u)
93 #define SPI_PC0_CLEAR_HW_CS_MASK (0xFFFFFF00u)
96 #define SPI_TX_EMPTY_TIMEOUT_ITERATIONS (6000u)
99 #define SPI_MAX_NUMBER_HW_CS (6u)
102 #define SPI_SPS_CS_GIOPORT (hetREG2->DOUT)
103 #define SPI_SPS_CS_GIOPORT_DIR (hetREG2->DIR)
104 #define SPI_SPS_CS_PIN (1u)
Configuration of the battery system (e.g., number of battery modules, battery cells,...
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
General macros and definitions for the whole platform.
void SPI_SpsInterfaceSwitchToLowSpeed(SPI_INTERFACE_CONFIG_s *pSpiSpsInterface)
Switch the SPS spi handle to low speed.
SPI_INTERFACE_CONFIG_s spi_mxmInterface
SPI_INTERFACE_CONFIG_s spi_adc0Interface
SPI_INTERFACE_CONFIG_s spi_kSbcMcuInterface
SPI_INTERFACE_CONFIG_s spi_nxp775InterfaceTx[BS_NR_OF_STRINGS]
SPI_BUSY_STATE_e spi_busyFlags[]
SPI_INTERFACE_CONFIG_s spi_framInterface
SPI_INTERFACE_CONFIG_s spi_adc1Interface
void SPI_SpsInterfaceSwitchToHighSpeed(SPI_INTERFACE_CONFIG_s *pSpiSpsInterface)
Switch the SPS spi handle to high speed.
SPI_INTERFACE_CONFIG_s spi_nxp775InterfaceRx[BS_NR_OF_STRINGS]
SPI_INTERFACE_CONFIG_s spi_ltcInterface[BS_NR_OF_STRINGS]
const uint8_t spi_nrBusyFlags
@ SPI_CHIP_SELECT_SOFTWARE
@ SPI_CHIP_SELECT_HARDWARE
SPI_INTERFACE_CONFIG_s spi_spsInterface
SPI_CHIP_SELECT_TYPE_e csType
volatile uint32_t * pGioPort