foxBMS - Unit Tests  1.2.0
The foxBMS Unit Tests API Documentation
SPI data configuration structs

Variables

static const spiDAT1_t spi_kLtcDataConfig
 
static const spiDAT1_t spi_kMxmDataConfig
 
static const spiDAT1_t spi_kNxp775DataConfig
 
static const spiDAT1_t spi_kFramDataConfig
 
static const spiDAT1_t spi_kSpsDataConfigLowSpeed
 
static const spiDAT1_t spi_kSpsDataConfigHighSpeed
 
static const spiDAT1_t spi_kAdcDataConfig
 
static const spiDAT1_t spi_kSbcDataConfig
 

Detailed Description

These data configuration structs are used below in the SPI_INTERFACE_CONFIG_s structures. Each data configuration structs refers to a format selection (e.g. SPI_FMT_0). These are defined in the HAL for each SPI channel (1-5). In order to limit potential confusion the data formats on SPI1 and SPI4 (the SPI interfaces that are routed to the interface board that contains the AFE) have to be configured the same. This way, the developer can switch between SPI1 and SPI4 without having to change the SPI data format.

AFE SPI data format
LTC SPI_FMT_0
MXM SPI_FMT_1
NXP SPI_FMT_2
unused SPI_FMT_3

Variable Documentation

◆ spi_kAdcDataConfig

const spiDAT1_t spi_kAdcDataConfig
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_2,
.CSNR = 0x0,
}

SPI data configuration struct for ADC communication

Definition at line 137 of file spi_cfg.c.

◆ spi_kFramDataConfig

const spiDAT1_t spi_kFramDataConfig
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_1,
.CSNR = 0x0,
}

SPI data configuration struct for FRAM communication

Definition at line 110 of file spi_cfg.c.

◆ spi_kLtcDataConfig

const spiDAT1_t spi_kLtcDataConfig
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_0,
.CSNR = 0x0,
}

SPI data configuration struct for LTC communication

Definition at line 85 of file spi_cfg.c.

◆ spi_kMxmDataConfig

const spiDAT1_t spi_kMxmDataConfig
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_1,
.CSNR = 0x00,
}

SPI data configuration struct for MXM communication

Definition at line 94 of file spi_cfg.c.

◆ spi_kNxp775DataConfig

const spiDAT1_t spi_kNxp775DataConfig
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_2,
.CSNR = 0x0,
}

SPI data configuration struct for NXP MC33775A communication

Definition at line 102 of file spi_cfg.c.

◆ spi_kSbcDataConfig

const spiDAT1_t spi_kSbcDataConfig
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_0,
.CSNR = 0x0,
}

SPI configuration struct for SBC communication

Definition at line 146 of file spi_cfg.c.

◆ spi_kSpsDataConfigHighSpeed

const spiDAT1_t spi_kSpsDataConfigHighSpeed
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_2,
.CSNR = 0x0,
}

SPI data configuration struct for SPS communication in high speed (10MHz)

Definition at line 128 of file spi_cfg.c.

◆ spi_kSpsDataConfigLowSpeed

const spiDAT1_t spi_kSpsDataConfigLowSpeed
static
Initial value:
= {
.CS_HOLD = FALSE,
.WDEL = TRUE,
.DFSEL = SPI_FMT_1,
.CSNR = 0x0,
}

SPI data configuration struct for SPS communication in low speed (4MHz)

Definition at line 119 of file spi_cfg.c.