56 #ifndef FOXBMS__DMA_CFG_H_
57 #define FOXBMS__DMA_CFG_H_
64 #include "HL_sys_dma.h"
71 #define DMA_INITIAL_FRAME_COUNTER_POSITION (16u)
75 #define DMA_CHANNEL_SPI1_TX (DMA_CH0)
76 #define DMA_CHANNEL_SPI1_RX (DMA_CH1)
77 #define DMA_CHANNEL_SPI2_TX (DMA_CH2)
78 #define DMA_CHANNEL_SPI2_RX (DMA_CH3)
79 #define DMA_CHANNEL_SPI3_TX (DMA_CH4)
80 #define DMA_CHANNEL_SPI3_RX (DMA_CH5)
81 #define DMA_CHANNEL_SPI4_TX (DMA_CH6)
82 #define DMA_CHANNEL_SPI4_RX (DMA_CH7)
83 #define DMA_CHANNEL_SPI5_TX (DMA_CH8)
84 #define DMA_CHANNEL_SPI5_RX (DMA_CH9)
85 #define DMA_CHANNEL_I2C1_TX (DMA_CH10)
86 #define DMA_CHANNEL_I2C1_RX (DMA_CH11)
87 #define DMA_CHANNEL_I2C2_TX (DMA_CH12)
88 #define DMA_CHANNEL_I2C2_RX (DMA_CH13)
93 #define DMA_REQ_LINE_SPI1_TX (DMA_REQ1)
94 #define DMA_REQ_LINE_SPI1_RX (DMA_REQ0)
95 #define DMA_REQ_LINE_SPI2_TX (DMA_REQ3)
96 #define DMA_REQ_LINE_SPI2_RX (DMA_REQ2)
97 #define DMA_REQ_LINE_SPI3_TX (DMA_REQ15)
98 #define DMA_REQ_LINE_SPI3_RX (DMA_REQ14)
99 #define DMA_REQ_LINE_SPI4_TX (DMA_REQ25)
100 #define DMA_REQ_LINE_SPI4_RX (DMA_REQ24)
101 #define DMA_REQ_LINE_SPI5_TX (DMA_REQ31)
102 #define DMA_REQ_LINE_SPI5_RX (DMA_REQ30)
103 #define DMA_REQ_LINE_I2C1_TX (DMA_REQ11)
104 #define DMA_REQ_LINE_I2C1_RX (DMA_REQ10)
105 #define DMA_REQ_LINE_I2C2_TX (DMA_REQ33)
106 #define DMA_REQ_LINE_I2C2_RX (DMA_REQ32)
110 #define DMA_BIG_ENDIAN_ADDRESS_8BIT (3u)
112 #define DMA_BIG_ENDIAN_ADDRESS_16BIT (2u)
115 #define DMA_NUMBER_SPI_INTERFACES (5u)
117 #define DMAREQEN_BIT (0x10000u)
119 #define SPIEN_BIT (0x1000000u)
123 #define DMA_REQ_LINE_LTC_TX (DMA_REQ_LINE_SPI1_TX)
124 #define DMA_REQ_LINE_LTC_RX (DMA_REQ_LINE_SPI1_RX)
129 #define DMA_REQ_LINE_N775_TX (DMA_REQ_LINE_SPI1_TX)
130 #define DMA_REQ_LINE_N775_RX (DMA_REQ_LINE_SPI5_RX)
154 #ifdef UNITY_UNIT_TEST
Configuration of the battery system (e.g., number of battery modules, battery cells,...
#define DMA_NUMBER_SPI_INTERFACES
DMA_REQUEST_CONFIG_s dma_spiDmaRequests[DMA_NUMBER_SPI_INTERFACES]
spiBASE_t * dma_spiInterfaces[DMA_NUMBER_SPI_INTERFACES]
DMA_CHANNEL_CONFIG_s dma_spiDmaChannels[DMA_NUMBER_SPI_INTERFACES]