foxBMS  1.1.1
The foxBMS Battery Management System API Documentation
dma_cfg.h File Reference

Headers for the configuration for the DMA module. More...

#include "general.h"
#include "battery_system_cfg.h"
#include "HL_spi.h"
#include "HL_sys_dma.h"
Include dependency graph for dma_cfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DMA_CHANNEL_CONFIG
 
struct  DMA_REQUEST_CONFIG
 

Macros

#define DMA_NUMBER_SPI_INTERFACES   5U
 
#define DMA_BIG_ENDIAN_ADDRESS_8BIT   (3U)
 
#define DMA_BIG_ENDIAN_ADDRESS_16BIT   (2U)
 
#define DMAREQEN_BIT   (0x10000U)
 
#define SPIEN_BIT   (0x1000000U)
 
#define DMA_REQ_LINE_SPI1_TX   (DMA_REQ1)
 
#define DMA_REQ_LINE_SPI1_RX   (DMA_REQ0)
 
#define DMA_REQ_LINE_SPI2_TX   (DMA_REQ3)
 
#define DMA_REQ_LINE_SPI2_RX   (DMA_REQ2)
 
#define DMA_REQ_LINE_SPI3_TX   (DMA_REQ15)
 
#define DMA_REQ_LINE_SPI3_RX   (DMA_REQ14)
 
#define DMA_REQ_LINE_SPI4_TX   (DMA_REQ25)
 
#define DMA_REQ_LINE_SPI4_RX   (DMA_REQ24)
 
#define DMA_REQ_LINE_SPI5_TX   (DMA_REQ31)
 
#define DMA_REQ_LINE_SPI5_RX   (DMA_REQ30)
 
#define DMA_REQ_LINE_LTC_TX   (DMA_REQ_LINE_SPI1_TX)
 
#define DMA_REQ_LINE_LTC_RX   (DMA_REQ_LINE_SPI1_RX)
 
#define DMA_REQ_LINE_N775_TX   (DMA_REQ_LINE_SPI1_TX)
 
#define DMA_REQ_LINE_N775_RX   (DMA_REQ_LINE_SPI5_RX)
 

Typedefs

typedef struct DMA_CHANNEL_CONFIG DMA_CHANNEL_CONFIG_s
 
typedef struct DMA_REQUEST_CONFIG DMA_REQUEST_CONFIG_s
 

Variables

DMA_CHANNEL_CONFIG_s dma_spiDmaChannels [DMA_NUMBER_SPI_INTERFACES]
 
DMA_REQUEST_CONFIG_s dma_spiDmaRequests [DMA_NUMBER_SPI_INTERFACES]
 
spiBASE_t * dma_spiInterfaces [DMA_NUMBER_SPI_INTERFACES]
 

Detailed Description

Headers for the configuration for the DMA module.

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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:

  • ″This product uses parts of foxBMS®″
  • ″This product includes parts of foxBMS®″
  • ″This product is derived from foxBMS®″
Author
foxBMS Team
Date
2020-03-05 (date of creation)
Updated
2020-03-05 (date of last update)
Prefix
DMA

Definition in file dma_cfg.h.

Macro Definition Documentation

◆ DMA_BIG_ENDIAN_ADDRESS_16BIT

#define DMA_BIG_ENDIAN_ADDRESS_16BIT   (2U)

define for the shift of an address for big endian 16bit

Definition at line 88 of file dma_cfg.h.

◆ DMA_BIG_ENDIAN_ADDRESS_8BIT

#define DMA_BIG_ENDIAN_ADDRESS_8BIT   (3U)

define for the shift of an address for big endian 8bit

Definition at line 86 of file dma_cfg.h.

◆ DMA_NUMBER_SPI_INTERFACES

#define DMA_NUMBER_SPI_INTERFACES   5U

number of spi interfaces for DMA

Definition at line 69 of file dma_cfg.h.

◆ DMA_REQ_LINE_LTC_RX

#define DMA_REQ_LINE_LTC_RX   (DMA_REQ_LINE_SPI1_RX)

DMA request line for LTC

Definition at line 97 of file dma_cfg.h.

◆ DMA_REQ_LINE_LTC_TX

#define DMA_REQ_LINE_LTC_TX   (DMA_REQ_LINE_SPI1_TX)

DMA request line for LTC

Definition at line 96 of file dma_cfg.h.

◆ DMA_REQ_LINE_N775_RX

#define DMA_REQ_LINE_N775_RX   (DMA_REQ_LINE_SPI5_RX)

DMA request line for N775

Definition at line 103 of file dma_cfg.h.

◆ DMA_REQ_LINE_N775_TX

#define DMA_REQ_LINE_N775_TX   (DMA_REQ_LINE_SPI1_TX)

DMA request line for N775

Definition at line 102 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI1_RX

#define DMA_REQ_LINE_SPI1_RX   (DMA_REQ0)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 74 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI1_TX

#define DMA_REQ_LINE_SPI1_TX   (DMA_REQ1)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 73 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI2_RX

#define DMA_REQ_LINE_SPI2_RX   (DMA_REQ2)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 76 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI2_TX

#define DMA_REQ_LINE_SPI2_TX   (DMA_REQ3)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 75 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI3_RX

#define DMA_REQ_LINE_SPI3_RX   (DMA_REQ14)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 78 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI3_TX

#define DMA_REQ_LINE_SPI3_TX   (DMA_REQ15)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 77 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI4_RX

#define DMA_REQ_LINE_SPI4_RX   (DMA_REQ24)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 80 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI4_TX

#define DMA_REQ_LINE_SPI4_TX   (DMA_REQ25)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 79 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI5_RX

#define DMA_REQ_LINE_SPI5_RX   (DMA_REQ30)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 82 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI5_TX

#define DMA_REQ_LINE_SPI5_TX   (DMA_REQ31)

defines for the DMA request lines (and to which SPI they belong)

Definition at line 81 of file dma_cfg.h.

◆ DMAREQEN_BIT

#define DMAREQEN_BIT   (0x10000U)

DMA Request enable bit

Definition at line 90 of file dma_cfg.h.

◆ SPIEN_BIT

#define SPIEN_BIT   (0x1000000U)

SPI enable bit

Definition at line 92 of file dma_cfg.h.

Typedef Documentation

◆ DMA_CHANNEL_CONFIG_s

describes the RX and TX DMA channels used for an SPI interface

◆ DMA_REQUEST_CONFIG_s

describes the DMA requests corresponding to the DMA channel used for an SPI interface

Variable Documentation

◆ dma_spiDmaChannels

DMA_CHANNEL_CONFIG_s dma_spiDmaChannels[DMA_NUMBER_SPI_INTERFACES]
extern

DMA channel configuration for SPI communication

Definition at line 68 of file dma_cfg.c.

◆ dma_spiDmaRequests

DMA_REQUEST_CONFIG_s dma_spiDmaRequests[DMA_NUMBER_SPI_INTERFACES]
extern

DMA request configuration for SPI communication

Definition at line 77 of file dma_cfg.c.

◆ dma_spiInterfaces

spiBASE_t* dma_spiInterfaces[DMA_NUMBER_SPI_INTERFACES]
extern

SPI enumeration for DMA

Definition at line 86 of file dma_cfg.c.