foxBMS  1.3.0
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_s
 
struct  DMA_REQUEST_CONFIG_s
 

Macros

#define DMA_BIG_ENDIAN_ADDRESS_8BIT   (3u)
 
#define DMA_BIG_ENDIAN_ADDRESS_16BIT   (2u)
 
#define DMA_NUMBER_SPI_INTERFACES   5u
 
#define DMAREQEN_BIT   (0x10000U)
 
#define SPIEN_BIT   (0x1000000U)
 
#define DMA_CHANNEL_SPI1_TX   (DMA_CH0)
 
#define DMA_CHANNEL_SPI1_RX   (DMA_CH1)
 
#define DMA_CHANNEL_SPI2_TX   (DMA_CH2)
 
#define DMA_CHANNEL_SPI2_RX   (DMA_CH3)
 
#define DMA_CHANNEL_SPI3_TX   (DMA_CH4)
 
#define DMA_CHANNEL_SPI3_RX   (DMA_CH5)
 
#define DMA_CHANNEL_SPI4_TX   (DMA_CH6)
 
#define DMA_CHANNEL_SPI4_RX   (DMA_CH7)
 
#define DMA_CHANNEL_SPI5_TX   (DMA_CH8)
 
#define DMA_CHANNEL_SPI5_RX   (DMA_CH9)
 
#define DMA_CHANNEL_I2C_TX   (DMA_CH10)
 
#define DMA_CHANNEL_I2C_RX   (DMA_CH11)
 
#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_I2C_TX   (DMA_REQ11)
 
#define DMA_REQ_LINE_I2C_RX   (DMA_REQ10)
 
#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)
 

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
2022-05-30 (date of last update)
Version
v1.3.0
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 104 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 102 of file dma_cfg.h.

◆ DMA_CHANNEL_I2C_RX

#define DMA_CHANNEL_I2C_RX   (DMA_CH11)

defines for the DMA channels

Definition at line 82 of file dma_cfg.h.

◆ DMA_CHANNEL_I2C_TX

#define DMA_CHANNEL_I2C_TX   (DMA_CH10)

defines for the DMA channels

Definition at line 81 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI1_RX

#define DMA_CHANNEL_SPI1_RX   (DMA_CH1)

defines for the DMA channels

Definition at line 72 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI1_TX

#define DMA_CHANNEL_SPI1_TX   (DMA_CH0)

defines for the DMA channels

Definition at line 71 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI2_RX

#define DMA_CHANNEL_SPI2_RX   (DMA_CH3)

defines for the DMA channels

Definition at line 74 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI2_TX

#define DMA_CHANNEL_SPI2_TX   (DMA_CH2)

defines for the DMA channels

Definition at line 73 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI3_RX

#define DMA_CHANNEL_SPI3_RX   (DMA_CH5)

defines for the DMA channels

Definition at line 76 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI3_TX

#define DMA_CHANNEL_SPI3_TX   (DMA_CH4)

defines for the DMA channels

Definition at line 75 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI4_RX

#define DMA_CHANNEL_SPI4_RX   (DMA_CH7)

defines for the DMA channels

Definition at line 78 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI4_TX

#define DMA_CHANNEL_SPI4_TX   (DMA_CH6)

defines for the DMA channels

Definition at line 77 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI5_RX

#define DMA_CHANNEL_SPI5_RX   (DMA_CH9)

defines for the DMA channels

Definition at line 80 of file dma_cfg.h.

◆ DMA_CHANNEL_SPI5_TX

#define DMA_CHANNEL_SPI5_TX   (DMA_CH8)

defines for the DMA channels

Definition at line 79 of file dma_cfg.h.

◆ DMA_NUMBER_SPI_INTERFACES

#define DMA_NUMBER_SPI_INTERFACES   5u

number of spi interfaces for DMA

Definition at line 107 of file dma_cfg.h.

◆ DMA_REQ_LINE_I2C_RX

#define DMA_REQ_LINE_I2C_RX   (DMA_REQ10)

defines for the DMA request lines

Definition at line 98 of file dma_cfg.h.

◆ DMA_REQ_LINE_I2C_TX

#define DMA_REQ_LINE_I2C_TX   (DMA_REQ11)

defines for the DMA request lines

Definition at line 97 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 116 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 115 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 122 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 121 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI1_RX

#define DMA_REQ_LINE_SPI1_RX   (DMA_REQ0)

defines for the DMA request lines

Definition at line 88 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI1_TX

#define DMA_REQ_LINE_SPI1_TX   (DMA_REQ1)

defines for the DMA request lines

Definition at line 87 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI2_RX

#define DMA_REQ_LINE_SPI2_RX   (DMA_REQ2)

defines for the DMA request lines

Definition at line 90 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI2_TX

#define DMA_REQ_LINE_SPI2_TX   (DMA_REQ3)

defines for the DMA request lines

Definition at line 89 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI3_RX

#define DMA_REQ_LINE_SPI3_RX   (DMA_REQ14)

defines for the DMA request lines

Definition at line 92 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI3_TX

#define DMA_REQ_LINE_SPI3_TX   (DMA_REQ15)

defines for the DMA request lines

Definition at line 91 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI4_RX

#define DMA_REQ_LINE_SPI4_RX   (DMA_REQ24)

defines for the DMA request lines

Definition at line 94 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI4_TX

#define DMA_REQ_LINE_SPI4_TX   (DMA_REQ25)

defines for the DMA request lines

Definition at line 93 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI5_RX

#define DMA_REQ_LINE_SPI5_RX   (DMA_REQ30)

defines for the DMA request lines

Definition at line 96 of file dma_cfg.h.

◆ DMA_REQ_LINE_SPI5_TX

#define DMA_REQ_LINE_SPI5_TX   (DMA_REQ31)

defines for the DMA request lines

Definition at line 95 of file dma_cfg.h.

◆ DMAREQEN_BIT

#define DMAREQEN_BIT   (0x10000U)

DMA Request enable bit

Definition at line 109 of file dma_cfg.h.

◆ SPIEN_BIT

#define SPIEN_BIT   (0x1000000U)

SPI enable bit

Definition at line 111 of file dma_cfg.h.

Variable Documentation

◆ dma_spiDmaChannels

DMA_CHANNEL_CONFIG_s dma_spiDmaChannels[DMA_NUMBER_SPI_INTERFACES]
extern

DMA channel configuration for SPI communication

Definition at line 69 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 78 of file dma_cfg.c.

◆ dma_spiInterfaces

spiBASE_t* dma_spiInterfaces[DMA_NUMBER_SPI_INTERFACES]
extern

SPI enumeration for DMA

Definition at line 87 of file dma_cfg.c.