2 ******************************************************************************
3 * @file stm32h7xx_ll_dma.h
4 * @author MCD Application Team
5 * @brief Header file of DMA LL module.
6 ******************************************************************************
9 * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
17 ******************************************************************************
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32H7xx_LL_DMA_H
22 #define STM32H7xx_LL_DMA_H
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32h7xx.h"
30 #include "stm32h7xx_ll_dmamux.h"
32 /** @addtogroup STM32H7xx_LL_Driver
36 #if defined (DMA1) || defined (DMA2)
38 /** @defgroup DMA_LL DMA
42 /* Private types -------------------------------------------------------------*/
43 /* Private variables ---------------------------------------------------------*/
44 /** @defgroup DMA_LL_Private_Variables DMA Private Variables
47 /* Array used to get the DMA stream register offset versus stream index LL_DMA_STREAM_x */
48 static const uint8_t LL_DMA_STR_OFFSET_TAB
[] =
50 (uint8_t)(DMA1_Stream0_BASE
- DMA1_BASE
),
51 (uint8_t)(DMA1_Stream1_BASE
- DMA1_BASE
),
52 (uint8_t)(DMA1_Stream2_BASE
- DMA1_BASE
),
53 (uint8_t)(DMA1_Stream3_BASE
- DMA1_BASE
),
54 (uint8_t)(DMA1_Stream4_BASE
- DMA1_BASE
),
55 (uint8_t)(DMA1_Stream5_BASE
- DMA1_BASE
),
56 (uint8_t)(DMA1_Stream6_BASE
- DMA1_BASE
),
57 (uint8_t)(DMA1_Stream7_BASE
- DMA1_BASE
)
65 /* Private macros ------------------------------------------------------------*/
68 * @brief Helper macro to convert DMA Instance DMAx into DMAMUX channel
69 * @note DMAMUX channel 0 to 7 are mapped to DMA1 stream 0 to 7.
70 * DMAMUX channel 8 to 15 are mapped to DMA2 stream 0 to 7.
71 * @param __DMA_INSTANCE__ DMAx
72 * @retval Channel_Offset (LL_DMAMUX_CHANNEL_8 or 0).
74 #define LL_DMA_INSTANCE_TO_DMAMUX_CHANNEL(__DMA_INSTANCE__) \
75 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) ? 0UL : 8UL)
77 /* Exported types ------------------------------------------------------------*/
78 #if defined(USE_FULL_LL_DRIVER)
79 /** @defgroup DMA_LL_ES_INIT DMA Exported Init structure
84 uint32_t PeriphOrM2MSrcAddress
; /*!< Specifies the peripheral base address for DMA transfer
85 or as Source base address in case of memory to memory transfer direction.
87 This parameter must be a value between Min_Data = 0 and Max_Data = 0xFFFFFFFF. */
89 uint32_t MemoryOrM2MDstAddress
; /*!< Specifies the memory base address for DMA transfer
90 or as Destination base address in case of memory to memory transfer direction.
92 This parameter must be a value between Min_Data = 0 and Max_Data = 0xFFFFFFFF. */
94 uint32_t Direction
; /*!< Specifies if the data will be transferred from memory to peripheral,
95 from memory to memory or from peripheral to memory.
96 This parameter can be a value of @ref DMA_LL_EC_DIRECTION
98 This feature can be modified afterwards using unitary function @ref LL_DMA_SetDataTransferDirection(). */
100 uint32_t Mode
; /*!< Specifies the normal or circular operation mode.
101 This parameter can be a value of @ref DMA_LL_EC_MODE
102 @note The circular buffer mode cannot be used if the memory to memory
103 data transfer direction is configured on the selected Stream
105 This feature can be modified afterwards using unitary function @ref LL_DMA_SetMode(). */
107 uint32_t PeriphOrM2MSrcIncMode
; /*!< Specifies whether the Peripheral address or Source address in case of memory to memory transfer direction
108 is incremented or not.
109 This parameter can be a value of @ref DMA_LL_EC_PERIPH
111 This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphIncMode(). */
113 uint32_t MemoryOrM2MDstIncMode
; /*!< Specifies whether the Memory address or Destination address in case of memory to memory transfer direction
114 is incremented or not.
115 This parameter can be a value of @ref DMA_LL_EC_MEMORY
117 This feature can be modified afterwards using unitary function @ref LL_DMA_SetMemoryIncMode(). */
119 uint32_t PeriphOrM2MSrcDataSize
; /*!< Specifies the Peripheral data size alignment or Source data size alignment (byte, half word, word)
120 in case of memory to memory transfer direction.
121 This parameter can be a value of @ref DMA_LL_EC_PDATAALIGN
123 This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphSize(). */
125 uint32_t MemoryOrM2MDstDataSize
; /*!< Specifies the Memory data size alignment or Destination data size alignment (byte, half word, word)
126 in case of memory to memory transfer direction.
127 This parameter can be a value of @ref DMA_LL_EC_MDATAALIGN
129 This feature can be modified afterwards using unitary function @ref LL_DMA_SetMemorySize(). */
131 uint32_t NbData
; /*!< Specifies the number of data to transfer, in data unit.
132 The data unit is equal to the source buffer configuration set in PeripheralSize
133 or MemorySize parameters depending in the transfer direction.
134 This parameter must be a value between Min_Data = 0 and Max_Data = 0x0000FFFF
136 This feature can be modified afterwards using unitary function @ref LL_DMA_SetDataLength(). */
138 uint32_t PeriphRequest
; /*!< Specifies the peripheral request.
139 This parameter can be a value of @ref DMAMUX1_Request_selection
141 This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphRequest(). */
143 uint32_t Priority
; /*!< Specifies the channel priority level.
144 This parameter can be a value of @ref DMA_LL_EC_PRIORITY
146 This feature can be modified afterwards using unitary function @ref LL_DMA_SetStreamPriorityLevel(). */
148 uint32_t FIFOMode
; /*!< Specifies if the FIFO mode or Direct mode will be used for the specified stream.
149 This parameter can be a value of @ref DMA_LL_FIFOMODE
150 @note The Direct mode (FIFO mode disabled) cannot be used if the
151 memory-to-memory data transfer is configured on the selected stream
153 This feature can be modified afterwards using unitary functions @ref LL_DMA_EnableFifoMode() or @ref LL_DMA_EnableFifoMode() . */
155 uint32_t FIFOThreshold
; /*!< Specifies the FIFO threshold level.
156 This parameter can be a value of @ref DMA_LL_EC_FIFOTHRESHOLD
158 This feature can be modified afterwards using unitary function @ref LL_DMA_SetFIFOThreshold(). */
160 uint32_t MemBurst
; /*!< Specifies the Burst transfer configuration for the memory transfers.
161 It specifies the amount of data to be transferred in a single non interruptible
163 This parameter can be a value of @ref DMA_LL_EC_MBURST
164 @note The burst mode is possible only if the address Increment mode is enabled.
166 This feature can be modified afterwards using unitary function @ref LL_DMA_SetMemoryBurstxfer(). */
168 uint32_t PeriphBurst
; /*!< Specifies the Burst transfer configuration for the peripheral transfers.
169 It specifies the amount of data to be transferred in a single non interruptible
171 This parameter can be a value of @ref DMA_LL_EC_PBURST
172 @note The burst mode is possible only if the address Increment mode is enabled.
174 This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphBurstxfer(). */
176 } LL_DMA_InitTypeDef
;
180 #endif /*USE_FULL_LL_DRIVER*/
181 /* Exported constants --------------------------------------------------------*/
182 /** @defgroup DMA_LL_Exported_Constants DMA Exported Constants
186 /** @defgroup DMA_LL_EC_STREAM STREAM
189 #define LL_DMA_STREAM_0 0x00000000U
190 #define LL_DMA_STREAM_1 0x00000001U
191 #define LL_DMA_STREAM_2 0x00000002U
192 #define LL_DMA_STREAM_3 0x00000003U
193 #define LL_DMA_STREAM_4 0x00000004U
194 #define LL_DMA_STREAM_5 0x00000005U
195 #define LL_DMA_STREAM_6 0x00000006U
196 #define LL_DMA_STREAM_7 0x00000007U
197 #define LL_DMA_STREAM_ALL 0xFFFF0000U
203 /** @defgroup DMA_LL_EC_DIRECTION DIRECTION
206 #define LL_DMA_DIRECTION_PERIPH_TO_MEMORY 0x00000000U /*!< Peripheral to memory direction */
207 #define LL_DMA_DIRECTION_MEMORY_TO_PERIPH DMA_SxCR_DIR_0 /*!< Memory to peripheral direction */
208 #define LL_DMA_DIRECTION_MEMORY_TO_MEMORY DMA_SxCR_DIR_1 /*!< Memory to memory direction */
213 /** @defgroup DMA_LL_EC_MODE MODE
216 #define LL_DMA_MODE_NORMAL 0x00000000U /*!< Normal Mode */
217 #define LL_DMA_MODE_CIRCULAR DMA_SxCR_CIRC /*!< Circular Mode */
218 #define LL_DMA_MODE_PFCTRL DMA_SxCR_PFCTRL /*!< Peripheral flow control mode */
223 /** @defgroup DMA_LL_EC_DOUBLEBUFFER_MODE DOUBLE BUFFER MODE
226 #define LL_DMA_DOUBLEBUFFER_MODE_DISABLE 0x00000000U /*!< Disable double buffering mode */
227 #define LL_DMA_DOUBLEBUFFER_MODE_ENABLE DMA_SxCR_DBM /*!< Enable double buffering mode */
232 /** @defgroup DMA_LL_EC_PERIPH PERIPH
235 #define LL_DMA_PERIPH_NOINCREMENT 0x00000000U /*!< Peripheral increment mode Disable */
236 #define LL_DMA_PERIPH_INCREMENT DMA_SxCR_PINC /*!< Peripheral increment mode Enable */
241 /** @defgroup DMA_LL_EC_MEMORY MEMORY
244 #define LL_DMA_MEMORY_NOINCREMENT 0x00000000U /*!< Memory increment mode Disable */
245 #define LL_DMA_MEMORY_INCREMENT DMA_SxCR_MINC /*!< Memory increment mode Enable */
250 /** @defgroup DMA_LL_EC_PDATAALIGN PDATAALIGN
253 #define LL_DMA_PDATAALIGN_BYTE 0x00000000U /*!< Peripheral data alignment : Byte */
254 #define LL_DMA_PDATAALIGN_HALFWORD DMA_SxCR_PSIZE_0 /*!< Peripheral data alignment : HalfWord */
255 #define LL_DMA_PDATAALIGN_WORD DMA_SxCR_PSIZE_1 /*!< Peripheral data alignment : Word */
260 /** @defgroup DMA_LL_EC_MDATAALIGN MDATAALIGN
263 #define LL_DMA_MDATAALIGN_BYTE 0x00000000U /*!< Memory data alignment : Byte */
264 #define LL_DMA_MDATAALIGN_HALFWORD DMA_SxCR_MSIZE_0 /*!< Memory data alignment : HalfWord */
265 #define LL_DMA_MDATAALIGN_WORD DMA_SxCR_MSIZE_1 /*!< Memory data alignment : Word */
270 /** @defgroup DMA_LL_EC_OFFSETSIZE OFFSETSIZE
273 #define LL_DMA_OFFSETSIZE_PSIZE 0x00000000U /*!< Peripheral increment offset size is linked to the PSIZE */
274 #define LL_DMA_OFFSETSIZE_FIXEDTO4 DMA_SxCR_PINCOS /*!< Peripheral increment offset size is fixed to 4 (32-bit alignment) */
279 /** @defgroup DMA_LL_EC_PRIORITY PRIORITY
282 #define LL_DMA_PRIORITY_LOW 0x00000000U /*!< Priority level : Low */
283 #define LL_DMA_PRIORITY_MEDIUM DMA_SxCR_PL_0 /*!< Priority level : Medium */
284 #define LL_DMA_PRIORITY_HIGH DMA_SxCR_PL_1 /*!< Priority level : High */
285 #define LL_DMA_PRIORITY_VERYHIGH DMA_SxCR_PL /*!< Priority level : Very_High */
291 /** @defgroup DMA_LL_EC_MBURST MBURST
294 #define LL_DMA_MBURST_SINGLE 0x00000000U /*!< Memory burst single transfer configuration */
295 #define LL_DMA_MBURST_INC4 DMA_SxCR_MBURST_0 /*!< Memory burst of 4 beats transfer configuration */
296 #define LL_DMA_MBURST_INC8 DMA_SxCR_MBURST_1 /*!< Memory burst of 8 beats transfer configuration */
297 #define LL_DMA_MBURST_INC16 (DMA_SxCR_MBURST_0 | DMA_SxCR_MBURST_1) /*!< Memory burst of 16 beats transfer configuration */
302 /** @defgroup DMA_LL_EC_PBURST PBURST
305 #define LL_DMA_PBURST_SINGLE 0x00000000U /*!< Peripheral burst single transfer configuration */
306 #define LL_DMA_PBURST_INC4 DMA_SxCR_PBURST_0 /*!< Peripheral burst of 4 beats transfer configuration */
307 #define LL_DMA_PBURST_INC8 DMA_SxCR_PBURST_1 /*!< Peripheral burst of 8 beats transfer configuration */
308 #define LL_DMA_PBURST_INC16 (DMA_SxCR_PBURST_0 | DMA_SxCR_PBURST_1) /*!< Peripheral burst of 16 beats transfer configuration */
313 /** @defgroup DMA_LL_FIFOMODE DMA_LL_FIFOMODE
316 #define LL_DMA_FIFOMODE_DISABLE 0x00000000U /*!< FIFO mode disable (direct mode is enabled) */
317 #define LL_DMA_FIFOMODE_ENABLE DMA_SxFCR_DMDIS /*!< FIFO mode enable */
322 /** @defgroup DMA_LL_EC_FIFOSTATUS_0 FIFOSTATUS 0
325 #define LL_DMA_FIFOSTATUS_0_25 0x00000000U /*!< 0 < fifo_level < 1/4 */
326 #define LL_DMA_FIFOSTATUS_25_50 DMA_SxFCR_FS_0 /*!< 1/4 < fifo_level < 1/2 */
327 #define LL_DMA_FIFOSTATUS_50_75 DMA_SxFCR_FS_1 /*!< 1/2 < fifo_level < 3/4 */
328 #define LL_DMA_FIFOSTATUS_75_100 (DMA_SxFCR_FS_1 | DMA_SxFCR_FS_0) /*!< 3/4 < fifo_level < full */
329 #define LL_DMA_FIFOSTATUS_EMPTY DMA_SxFCR_FS_2 /*!< FIFO is empty */
330 #define LL_DMA_FIFOSTATUS_FULL (DMA_SxFCR_FS_2 | DMA_SxFCR_FS_0) /*!< FIFO is full */
335 /** @defgroup DMA_LL_EC_FIFOTHRESHOLD FIFOTHRESHOLD
338 #define LL_DMA_FIFOTHRESHOLD_1_4 0x00000000U /*!< FIFO threshold 1 quart full configuration */
339 #define LL_DMA_FIFOTHRESHOLD_1_2 DMA_SxFCR_FTH_0 /*!< FIFO threshold half full configuration */
340 #define LL_DMA_FIFOTHRESHOLD_3_4 DMA_SxFCR_FTH_1 /*!< FIFO threshold 3 quarts full configuration */
341 #define LL_DMA_FIFOTHRESHOLD_FULL DMA_SxFCR_FTH /*!< FIFO threshold full configuration */
346 /** @defgroup DMA_LL_EC_CURRENTTARGETMEM CURRENTTARGETMEM
349 #define LL_DMA_CURRENTTARGETMEM0 0x00000000U /*!< Set CurrentTarget Memory to Memory 0 */
350 #define LL_DMA_CURRENTTARGETMEM1 DMA_SxCR_CT /*!< Set CurrentTarget Memory to Memory 1 */
359 /* Exported macro ------------------------------------------------------------*/
360 /** @defgroup DMA_LL_Exported_Macros DMA Exported Macros
364 /** @defgroup DMA_LL_EM_WRITE_READ Common Write and read registers macros
368 * @brief Write a value in DMA register
369 * @param __INSTANCE__ DMA Instance
370 * @param __REG__ Register to be written
371 * @param __VALUE__ Value to be written in the register
374 #define LL_DMA_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
377 * @brief Read a value in DMA register
378 * @param __INSTANCE__ DMA Instance
379 * @param __REG__ Register to be read
380 * @retval Register value
382 #define LL_DMA_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
387 /** @defgroup DMA_LL_EM_CONVERT_DMAxCHANNELy Convert DMAxStreamy
391 * @brief Convert DMAx_Streamy into DMAx
392 * @param __STREAM_INSTANCE__ DMAx_Streamy
395 #define __LL_DMA_GET_INSTANCE(__STREAM_INSTANCE__) \
396 (((uint32_t)(__STREAM_INSTANCE__) > ((uint32_t)DMA1_Stream7)) ? DMA2 : DMA1)
399 * @brief Convert DMAx_Streamy into LL_DMA_STREAM_y
400 * @param __STREAM_INSTANCE__ DMAx_Streamy
401 * @retval LL_DMA_STREAM_y
403 #define __LL_DMA_GET_STREAM(__STREAM_INSTANCE__) \
404 (((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA1_Stream0)) ? LL_DMA_STREAM_0 : \
405 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA2_Stream0)) ? LL_DMA_STREAM_0 : \
406 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA1_Stream1)) ? LL_DMA_STREAM_1 : \
407 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA2_Stream1)) ? LL_DMA_STREAM_1 : \
408 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA1_Stream2)) ? LL_DMA_STREAM_2 : \
409 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA2_Stream2)) ? LL_DMA_STREAM_2 : \
410 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA1_Stream3)) ? LL_DMA_STREAM_3 : \
411 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA2_Stream3)) ? LL_DMA_STREAM_3 : \
412 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA1_Stream4)) ? LL_DMA_STREAM_4 : \
413 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA2_Stream4)) ? LL_DMA_STREAM_4 : \
414 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA1_Stream5)) ? LL_DMA_STREAM_5 : \
415 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA2_Stream5)) ? LL_DMA_STREAM_5 : \
416 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA1_Stream6)) ? LL_DMA_STREAM_6 : \
417 ((uint32_t)(__STREAM_INSTANCE__) == ((uint32_t)DMA2_Stream6)) ? LL_DMA_STREAM_6 : \
421 * @brief Convert DMA Instance DMAx and LL_DMA_STREAM_y into DMAx_Streamy
422 * @param __DMA_INSTANCE__ DMAx
423 * @param __STREAM__ LL_DMA_STREAM_y
424 * @retval DMAx_Streamy
426 #define __LL_DMA_GET_STREAM_INSTANCE(__DMA_INSTANCE__, __STREAM__) \
427 ((((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_0))) ? DMA1_Stream0 : \
428 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_0))) ? DMA2_Stream0 : \
429 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_1))) ? DMA1_Stream1 : \
430 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_1))) ? DMA2_Stream1 : \
431 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_2))) ? DMA1_Stream2 : \
432 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_2))) ? DMA2_Stream2 : \
433 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_3))) ? DMA1_Stream3 : \
434 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_3))) ? DMA2_Stream3 : \
435 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_4))) ? DMA1_Stream4 : \
436 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_4))) ? DMA2_Stream4 : \
437 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_5))) ? DMA1_Stream5 : \
438 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_5))) ? DMA2_Stream5 : \
439 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_6))) ? DMA1_Stream6 : \
440 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_6))) ? DMA2_Stream6 : \
441 (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__STREAM__) == ((uint32_t)LL_DMA_STREAM_7))) ? DMA1_Stream7 : \
453 /* Exported functions --------------------------------------------------------*/
454 /** @defgroup DMA_LL_Exported_Functions DMA Exported Functions
458 /** @defgroup DMA_LL_EF_Configuration Configuration
462 * @brief Enable DMA stream.
463 * @rmtoll CR EN LL_DMA_EnableStream
464 * @param DMAx DMAx Instance
465 * @param Stream This parameter can be one of the following values:
466 * @arg @ref LL_DMA_STREAM_0
467 * @arg @ref LL_DMA_STREAM_1
468 * @arg @ref LL_DMA_STREAM_2
469 * @arg @ref LL_DMA_STREAM_3
470 * @arg @ref LL_DMA_STREAM_4
471 * @arg @ref LL_DMA_STREAM_5
472 * @arg @ref LL_DMA_STREAM_6
473 * @arg @ref LL_DMA_STREAM_7
476 __STATIC_INLINE
void LL_DMA_EnableStream(DMA_TypeDef
*DMAx
, uint32_t Stream
)
478 uint32_t dma_base_addr
= (uint32_t)DMAx
;
480 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_EN
);
484 * @brief Disable DMA stream.
485 * @rmtoll CR EN LL_DMA_DisableStream
486 * @param DMAx DMAx Instance
487 * @param Stream This parameter can be one of the following values:
488 * @arg @ref LL_DMA_STREAM_0
489 * @arg @ref LL_DMA_STREAM_1
490 * @arg @ref LL_DMA_STREAM_2
491 * @arg @ref LL_DMA_STREAM_3
492 * @arg @ref LL_DMA_STREAM_4
493 * @arg @ref LL_DMA_STREAM_5
494 * @arg @ref LL_DMA_STREAM_6
495 * @arg @ref LL_DMA_STREAM_7
498 __STATIC_INLINE
void LL_DMA_DisableStream(DMA_TypeDef
*DMAx
, uint32_t Stream
)
500 uint32_t dma_base_addr
= (uint32_t)DMAx
;
502 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_EN
);
506 * @brief Check if DMA stream is enabled or disabled.
507 * @rmtoll CR EN LL_DMA_IsEnabledStream
508 * @param DMAx DMAx Instance
509 * @param Stream This parameter can be one of the following values:
510 * @arg @ref LL_DMA_STREAM_0
511 * @arg @ref LL_DMA_STREAM_1
512 * @arg @ref LL_DMA_STREAM_2
513 * @arg @ref LL_DMA_STREAM_3
514 * @arg @ref LL_DMA_STREAM_4
515 * @arg @ref LL_DMA_STREAM_5
516 * @arg @ref LL_DMA_STREAM_6
517 * @arg @ref LL_DMA_STREAM_7
518 * @retval State of bit (1 or 0).
520 __STATIC_INLINE
uint32_t LL_DMA_IsEnabledStream(DMA_TypeDef
*DMAx
, uint32_t Stream
)
522 uint32_t dma_base_addr
= (uint32_t)DMAx
;
524 return ((READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_EN
) == (DMA_SxCR_EN
)) ? 1UL : 0UL);
528 * @brief Configure all parameters linked to DMA transfer.
529 * @rmtoll CR DIR LL_DMA_ConfigTransfer\n
530 * CR CIRC LL_DMA_ConfigTransfer\n
531 * CR PINC LL_DMA_ConfigTransfer\n
532 * CR MINC LL_DMA_ConfigTransfer\n
533 * CR PSIZE LL_DMA_ConfigTransfer\n
534 * CR MSIZE LL_DMA_ConfigTransfer\n
535 * CR PL LL_DMA_ConfigTransfer\n
536 * CR PFCTRL LL_DMA_ConfigTransfer
537 * @param DMAx DMAx Instance
538 * @param Stream This parameter can be one of the following values:
539 * @arg @ref LL_DMA_STREAM_0
540 * @arg @ref LL_DMA_STREAM_1
541 * @arg @ref LL_DMA_STREAM_2
542 * @arg @ref LL_DMA_STREAM_3
543 * @arg @ref LL_DMA_STREAM_4
544 * @arg @ref LL_DMA_STREAM_5
545 * @arg @ref LL_DMA_STREAM_6
546 * @arg @ref LL_DMA_STREAM_7
547 * @param Configuration This parameter must be a combination of all the following values:
548 * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY or @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH or @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY
549 * @arg @ref LL_DMA_MODE_NORMAL or @ref LL_DMA_MODE_CIRCULAR or @ref LL_DMA_MODE_PFCTRL
550 * @arg @ref LL_DMA_PERIPH_INCREMENT or @ref LL_DMA_PERIPH_NOINCREMENT
551 * @arg @ref LL_DMA_MEMORY_INCREMENT or @ref LL_DMA_MEMORY_NOINCREMENT
552 * @arg @ref LL_DMA_PDATAALIGN_BYTE or @ref LL_DMA_PDATAALIGN_HALFWORD or @ref LL_DMA_PDATAALIGN_WORD
553 * @arg @ref LL_DMA_MDATAALIGN_BYTE or @ref LL_DMA_MDATAALIGN_HALFWORD or @ref LL_DMA_MDATAALIGN_WORD
554 * @arg @ref LL_DMA_PRIORITY_LOW or @ref LL_DMA_PRIORITY_MEDIUM or @ref LL_DMA_PRIORITY_HIGH or @ref LL_DMA_PRIORITY_VERYHIGH
557 __STATIC_INLINE
void LL_DMA_ConfigTransfer(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Configuration
)
559 uint32_t dma_base_addr
= (uint32_t)DMAx
;
561 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
,
562 DMA_SxCR_DIR
| DMA_SxCR_CIRC
| DMA_SxCR_PINC
| DMA_SxCR_MINC
| DMA_SxCR_PSIZE
| DMA_SxCR_MSIZE
| DMA_SxCR_PL
| DMA_SxCR_PFCTRL
,
567 * @brief Set Data transfer direction (read from peripheral or from memory).
568 * @rmtoll CR DIR LL_DMA_SetDataTransferDirection
569 * @param DMAx DMAx Instance
570 * @param Stream This parameter can be one of the following values:
571 * @arg @ref LL_DMA_STREAM_0
572 * @arg @ref LL_DMA_STREAM_1
573 * @arg @ref LL_DMA_STREAM_2
574 * @arg @ref LL_DMA_STREAM_3
575 * @arg @ref LL_DMA_STREAM_4
576 * @arg @ref LL_DMA_STREAM_5
577 * @arg @ref LL_DMA_STREAM_6
578 * @arg @ref LL_DMA_STREAM_7
579 * @param Direction This parameter can be one of the following values:
580 * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY
581 * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH
582 * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY
585 __STATIC_INLINE
void LL_DMA_SetDataTransferDirection(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Direction
)
587 uint32_t dma_base_addr
= (uint32_t)DMAx
;
589 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_DIR
, Direction
);
593 * @brief Get Data transfer direction (read from peripheral or from memory).
594 * @rmtoll CR DIR LL_DMA_GetDataTransferDirection
595 * @param DMAx DMAx Instance
596 * @param Stream This parameter can be one of the following values:
597 * @arg @ref LL_DMA_STREAM_0
598 * @arg @ref LL_DMA_STREAM_1
599 * @arg @ref LL_DMA_STREAM_2
600 * @arg @ref LL_DMA_STREAM_3
601 * @arg @ref LL_DMA_STREAM_4
602 * @arg @ref LL_DMA_STREAM_5
603 * @arg @ref LL_DMA_STREAM_6
604 * @arg @ref LL_DMA_STREAM_7
605 * @retval Returned value can be one of the following values:
606 * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY
607 * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH
608 * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY
610 __STATIC_INLINE
uint32_t LL_DMA_GetDataTransferDirection(DMA_TypeDef
*DMAx
, uint32_t Stream
)
612 uint32_t dma_base_addr
= (uint32_t)DMAx
;
614 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_DIR
));
618 * @brief Set DMA mode normal, circular or peripheral flow control.
619 * @rmtoll CR CIRC LL_DMA_SetMode\n
620 * CR PFCTRL LL_DMA_SetMode
621 * @param DMAx DMAx Instance
622 * @param Stream This parameter can be one of the following values:
623 * @arg @ref LL_DMA_STREAM_0
624 * @arg @ref LL_DMA_STREAM_1
625 * @arg @ref LL_DMA_STREAM_2
626 * @arg @ref LL_DMA_STREAM_3
627 * @arg @ref LL_DMA_STREAM_4
628 * @arg @ref LL_DMA_STREAM_5
629 * @arg @ref LL_DMA_STREAM_6
630 * @arg @ref LL_DMA_STREAM_7
631 * @param Mode This parameter can be one of the following values:
632 * @arg @ref LL_DMA_MODE_NORMAL
633 * @arg @ref LL_DMA_MODE_CIRCULAR
634 * @arg @ref LL_DMA_MODE_PFCTRL
637 __STATIC_INLINE
void LL_DMA_SetMode(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Mode
)
639 uint32_t dma_base_addr
= (uint32_t)DMAx
;
641 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_CIRC
| DMA_SxCR_PFCTRL
, Mode
);
645 * @brief Get DMA mode normal, circular or peripheral flow control.
646 * @rmtoll CR CIRC LL_DMA_GetMode\n
647 * CR PFCTRL LL_DMA_GetMode
648 * @param DMAx DMAx Instance
649 * @param Stream This parameter can be one of the following values:
650 * @arg @ref LL_DMA_STREAM_0
651 * @arg @ref LL_DMA_STREAM_1
652 * @arg @ref LL_DMA_STREAM_2
653 * @arg @ref LL_DMA_STREAM_3
654 * @arg @ref LL_DMA_STREAM_4
655 * @arg @ref LL_DMA_STREAM_5
656 * @arg @ref LL_DMA_STREAM_6
657 * @arg @ref LL_DMA_STREAM_7
658 * @retval Returned value can be one of the following values:
659 * @arg @ref LL_DMA_MODE_NORMAL
660 * @arg @ref LL_DMA_MODE_CIRCULAR
661 * @arg @ref LL_DMA_MODE_PFCTRL
663 __STATIC_INLINE
uint32_t LL_DMA_GetMode(DMA_TypeDef
*DMAx
, uint32_t Stream
)
665 uint32_t dma_base_addr
= (uint32_t)DMAx
;
667 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_CIRC
| DMA_SxCR_PFCTRL
));
671 * @brief Set Peripheral increment mode.
672 * @rmtoll CR PINC LL_DMA_SetPeriphIncMode
673 * @param DMAx DMAx Instance
674 * @param Stream This parameter can be one of the following values:
675 * @arg @ref LL_DMA_STREAM_0
676 * @arg @ref LL_DMA_STREAM_1
677 * @arg @ref LL_DMA_STREAM_2
678 * @arg @ref LL_DMA_STREAM_3
679 * @arg @ref LL_DMA_STREAM_4
680 * @arg @ref LL_DMA_STREAM_5
681 * @arg @ref LL_DMA_STREAM_6
682 * @arg @ref LL_DMA_STREAM_7
683 * @param IncrementMode This parameter can be one of the following values:
684 * @arg @ref LL_DMA_PERIPH_NOINCREMENT
685 * @arg @ref LL_DMA_PERIPH_INCREMENT
688 __STATIC_INLINE
void LL_DMA_SetPeriphIncMode(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t IncrementMode
)
690 uint32_t dma_base_addr
= (uint32_t)DMAx
;
692 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PINC
, IncrementMode
);
696 * @brief Get Peripheral increment mode.
697 * @rmtoll CR PINC LL_DMA_GetPeriphIncMode
698 * @param DMAx DMAx Instance
699 * @param Stream This parameter can be one of the following values:
700 * @arg @ref LL_DMA_STREAM_0
701 * @arg @ref LL_DMA_STREAM_1
702 * @arg @ref LL_DMA_STREAM_2
703 * @arg @ref LL_DMA_STREAM_3
704 * @arg @ref LL_DMA_STREAM_4
705 * @arg @ref LL_DMA_STREAM_5
706 * @arg @ref LL_DMA_STREAM_6
707 * @arg @ref LL_DMA_STREAM_7
708 * @retval Returned value can be one of the following values:
709 * @arg @ref LL_DMA_PERIPH_NOINCREMENT
710 * @arg @ref LL_DMA_PERIPH_INCREMENT
712 __STATIC_INLINE
uint32_t LL_DMA_GetPeriphIncMode(DMA_TypeDef
*DMAx
, uint32_t Stream
)
714 uint32_t dma_base_addr
= (uint32_t)DMAx
;
716 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PINC
));
720 * @brief Set Memory increment mode.
721 * @rmtoll CR MINC LL_DMA_SetMemoryIncMode
722 * @param DMAx DMAx Instance
723 * @param Stream This parameter can be one of the following values:
724 * @arg @ref LL_DMA_STREAM_0
725 * @arg @ref LL_DMA_STREAM_1
726 * @arg @ref LL_DMA_STREAM_2
727 * @arg @ref LL_DMA_STREAM_3
728 * @arg @ref LL_DMA_STREAM_4
729 * @arg @ref LL_DMA_STREAM_5
730 * @arg @ref LL_DMA_STREAM_6
731 * @arg @ref LL_DMA_STREAM_7
732 * @param IncrementMode This parameter can be one of the following values:
733 * @arg @ref LL_DMA_MEMORY_NOINCREMENT
734 * @arg @ref LL_DMA_MEMORY_INCREMENT
737 __STATIC_INLINE
void LL_DMA_SetMemoryIncMode(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t IncrementMode
)
739 uint32_t dma_base_addr
= (uint32_t)DMAx
;
741 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_MINC
, IncrementMode
);
745 * @brief Get Memory increment mode.
746 * @rmtoll CR MINC LL_DMA_GetMemoryIncMode
747 * @param DMAx DMAx Instance
748 * @param Stream This parameter can be one of the following values:
749 * @arg @ref LL_DMA_STREAM_0
750 * @arg @ref LL_DMA_STREAM_1
751 * @arg @ref LL_DMA_STREAM_2
752 * @arg @ref LL_DMA_STREAM_3
753 * @arg @ref LL_DMA_STREAM_4
754 * @arg @ref LL_DMA_STREAM_5
755 * @arg @ref LL_DMA_STREAM_6
756 * @arg @ref LL_DMA_STREAM_7
757 * @retval Returned value can be one of the following values:
758 * @arg @ref LL_DMA_MEMORY_NOINCREMENT
759 * @arg @ref LL_DMA_MEMORY_INCREMENT
761 __STATIC_INLINE
uint32_t LL_DMA_GetMemoryIncMode(DMA_TypeDef
*DMAx
, uint32_t Stream
)
763 uint32_t dma_base_addr
= (uint32_t)DMAx
;
765 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_MINC
));
769 * @brief Set Peripheral size.
770 * @rmtoll CR PSIZE LL_DMA_SetPeriphSize
771 * @param DMAx DMAx Instance
772 * @param Stream This parameter can be one of the following values:
773 * @arg @ref LL_DMA_STREAM_0
774 * @arg @ref LL_DMA_STREAM_1
775 * @arg @ref LL_DMA_STREAM_2
776 * @arg @ref LL_DMA_STREAM_3
777 * @arg @ref LL_DMA_STREAM_4
778 * @arg @ref LL_DMA_STREAM_5
779 * @arg @ref LL_DMA_STREAM_6
780 * @arg @ref LL_DMA_STREAM_7
781 * @param Size This parameter can be one of the following values:
782 * @arg @ref LL_DMA_PDATAALIGN_BYTE
783 * @arg @ref LL_DMA_PDATAALIGN_HALFWORD
784 * @arg @ref LL_DMA_PDATAALIGN_WORD
787 __STATIC_INLINE
void LL_DMA_SetPeriphSize(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Size
)
789 uint32_t dma_base_addr
= (uint32_t)DMAx
;
791 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PSIZE
, Size
);
795 * @brief Get Peripheral size.
796 * @rmtoll CR PSIZE LL_DMA_GetPeriphSize
797 * @param DMAx DMAx Instance
798 * @param Stream This parameter can be one of the following values:
799 * @arg @ref LL_DMA_STREAM_0
800 * @arg @ref LL_DMA_STREAM_1
801 * @arg @ref LL_DMA_STREAM_2
802 * @arg @ref LL_DMA_STREAM_3
803 * @arg @ref LL_DMA_STREAM_4
804 * @arg @ref LL_DMA_STREAM_5
805 * @arg @ref LL_DMA_STREAM_6
806 * @arg @ref LL_DMA_STREAM_7
807 * @retval Returned value can be one of the following values:
808 * @arg @ref LL_DMA_PDATAALIGN_BYTE
809 * @arg @ref LL_DMA_PDATAALIGN_HALFWORD
810 * @arg @ref LL_DMA_PDATAALIGN_WORD
812 __STATIC_INLINE
uint32_t LL_DMA_GetPeriphSize(DMA_TypeDef
*DMAx
, uint32_t Stream
)
814 uint32_t dma_base_addr
= (uint32_t)DMAx
;
816 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PSIZE
));
820 * @brief Set Memory size.
821 * @rmtoll CR MSIZE LL_DMA_SetMemorySize
822 * @param DMAx DMAx Instance
823 * @param Stream This parameter can be one of the following values:
824 * @arg @ref LL_DMA_STREAM_0
825 * @arg @ref LL_DMA_STREAM_1
826 * @arg @ref LL_DMA_STREAM_2
827 * @arg @ref LL_DMA_STREAM_3
828 * @arg @ref LL_DMA_STREAM_4
829 * @arg @ref LL_DMA_STREAM_5
830 * @arg @ref LL_DMA_STREAM_6
831 * @arg @ref LL_DMA_STREAM_7
832 * @param Size This parameter can be one of the following values:
833 * @arg @ref LL_DMA_MDATAALIGN_BYTE
834 * @arg @ref LL_DMA_MDATAALIGN_HALFWORD
835 * @arg @ref LL_DMA_MDATAALIGN_WORD
838 __STATIC_INLINE
void LL_DMA_SetMemorySize(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Size
)
840 uint32_t dma_base_addr
= (uint32_t)DMAx
;
842 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_MSIZE
, Size
);
846 * @brief Get Memory size.
847 * @rmtoll CR MSIZE LL_DMA_GetMemorySize
848 * @param DMAx DMAx Instance
849 * @param Stream This parameter can be one of the following values:
850 * @arg @ref LL_DMA_STREAM_0
851 * @arg @ref LL_DMA_STREAM_1
852 * @arg @ref LL_DMA_STREAM_2
853 * @arg @ref LL_DMA_STREAM_3
854 * @arg @ref LL_DMA_STREAM_4
855 * @arg @ref LL_DMA_STREAM_5
856 * @arg @ref LL_DMA_STREAM_6
857 * @arg @ref LL_DMA_STREAM_7
858 * @retval Returned value can be one of the following values:
859 * @arg @ref LL_DMA_MDATAALIGN_BYTE
860 * @arg @ref LL_DMA_MDATAALIGN_HALFWORD
861 * @arg @ref LL_DMA_MDATAALIGN_WORD
863 __STATIC_INLINE
uint32_t LL_DMA_GetMemorySize(DMA_TypeDef
*DMAx
, uint32_t Stream
)
865 uint32_t dma_base_addr
= (uint32_t)DMAx
;
867 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_MSIZE
));
871 * @brief Set Peripheral increment offset size.
872 * @rmtoll CR PINCOS LL_DMA_SetIncOffsetSize
873 * @param DMAx DMAx Instance
874 * @param Stream This parameter can be one of the following values:
875 * @arg @ref LL_DMA_STREAM_0
876 * @arg @ref LL_DMA_STREAM_1
877 * @arg @ref LL_DMA_STREAM_2
878 * @arg @ref LL_DMA_STREAM_3
879 * @arg @ref LL_DMA_STREAM_4
880 * @arg @ref LL_DMA_STREAM_5
881 * @arg @ref LL_DMA_STREAM_6
882 * @arg @ref LL_DMA_STREAM_7
883 * @param OffsetSize This parameter can be one of the following values:
884 * @arg @ref LL_DMA_OFFSETSIZE_PSIZE
885 * @arg @ref LL_DMA_OFFSETSIZE_FIXEDTO4
888 __STATIC_INLINE
void LL_DMA_SetIncOffsetSize(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t OffsetSize
)
890 uint32_t dma_base_addr
= (uint32_t)DMAx
;
892 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PINCOS
, OffsetSize
);
896 * @brief Get Peripheral increment offset size.
897 * @rmtoll CR PINCOS LL_DMA_GetIncOffsetSize
898 * @param DMAx DMAx Instance
899 * @param Stream This parameter can be one of the following values:
900 * @arg @ref LL_DMA_STREAM_0
901 * @arg @ref LL_DMA_STREAM_1
902 * @arg @ref LL_DMA_STREAM_2
903 * @arg @ref LL_DMA_STREAM_3
904 * @arg @ref LL_DMA_STREAM_4
905 * @arg @ref LL_DMA_STREAM_5
906 * @arg @ref LL_DMA_STREAM_6
907 * @arg @ref LL_DMA_STREAM_7
908 * @retval Returned value can be one of the following values:
909 * @arg @ref LL_DMA_OFFSETSIZE_PSIZE
910 * @arg @ref LL_DMA_OFFSETSIZE_FIXEDTO4
912 __STATIC_INLINE
uint32_t LL_DMA_GetIncOffsetSize(DMA_TypeDef
*DMAx
, uint32_t Stream
)
914 uint32_t dma_base_addr
= (uint32_t)DMAx
;
916 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PINCOS
));
920 * @brief Set Stream priority level.
921 * @rmtoll CR PL LL_DMA_SetStreamPriorityLevel
922 * @param DMAx DMAx Instance
923 * @param Stream This parameter can be one of the following values:
924 * @arg @ref LL_DMA_STREAM_0
925 * @arg @ref LL_DMA_STREAM_1
926 * @arg @ref LL_DMA_STREAM_2
927 * @arg @ref LL_DMA_STREAM_3
928 * @arg @ref LL_DMA_STREAM_4
929 * @arg @ref LL_DMA_STREAM_5
930 * @arg @ref LL_DMA_STREAM_6
931 * @arg @ref LL_DMA_STREAM_7
932 * @param Priority This parameter can be one of the following values:
933 * @arg @ref LL_DMA_PRIORITY_LOW
934 * @arg @ref LL_DMA_PRIORITY_MEDIUM
935 * @arg @ref LL_DMA_PRIORITY_HIGH
936 * @arg @ref LL_DMA_PRIORITY_VERYHIGH
939 __STATIC_INLINE
void LL_DMA_SetStreamPriorityLevel(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Priority
)
941 uint32_t dma_base_addr
= (uint32_t)DMAx
;
943 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PL
, Priority
);
947 * @brief Get Stream priority level.
948 * @rmtoll CR PL LL_DMA_GetStreamPriorityLevel
949 * @param DMAx DMAx Instance
950 * @param Stream This parameter can be one of the following values:
951 * @arg @ref LL_DMA_STREAM_0
952 * @arg @ref LL_DMA_STREAM_1
953 * @arg @ref LL_DMA_STREAM_2
954 * @arg @ref LL_DMA_STREAM_3
955 * @arg @ref LL_DMA_STREAM_4
956 * @arg @ref LL_DMA_STREAM_5
957 * @arg @ref LL_DMA_STREAM_6
958 * @arg @ref LL_DMA_STREAM_7
959 * @retval Returned value can be one of the following values:
960 * @arg @ref LL_DMA_PRIORITY_LOW
961 * @arg @ref LL_DMA_PRIORITY_MEDIUM
962 * @arg @ref LL_DMA_PRIORITY_HIGH
963 * @arg @ref LL_DMA_PRIORITY_VERYHIGH
965 __STATIC_INLINE
uint32_t LL_DMA_GetStreamPriorityLevel(DMA_TypeDef
*DMAx
, uint32_t Stream
)
967 uint32_t dma_base_addr
= (uint32_t)DMAx
;
969 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PL
));
973 * @brief Enable DMA stream bufferable transfer.
974 * @rmtoll CR TRBUFF LL_DMA_EnableBufferableTransfer
975 * @param DMAx DMAx Instance
976 * @param Stream This parameter can be one of the following values:
977 * @arg @ref LL_DMA_STREAM_0
978 * @arg @ref LL_DMA_STREAM_1
979 * @arg @ref LL_DMA_STREAM_2
980 * @arg @ref LL_DMA_STREAM_3
981 * @arg @ref LL_DMA_STREAM_4
982 * @arg @ref LL_DMA_STREAM_5
983 * @arg @ref LL_DMA_STREAM_6
984 * @arg @ref LL_DMA_STREAM_7
987 __STATIC_INLINE
void LL_DMA_EnableBufferableTransfer(DMA_TypeDef
*DMAx
, uint32_t Stream
)
989 uint32_t dma_base_addr
= (uint32_t)DMAx
;
991 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TRBUFF
);
995 * @brief Disable DMA stream bufferable transfer.
996 * @rmtoll CR TRBUFF LL_DMA_DisableBufferableTransfer
997 * @param DMAx DMAx Instance
998 * @param Stream This parameter can be one of the following values:
999 * @arg @ref LL_DMA_STREAM_0
1000 * @arg @ref LL_DMA_STREAM_1
1001 * @arg @ref LL_DMA_STREAM_2
1002 * @arg @ref LL_DMA_STREAM_3
1003 * @arg @ref LL_DMA_STREAM_4
1004 * @arg @ref LL_DMA_STREAM_5
1005 * @arg @ref LL_DMA_STREAM_6
1006 * @arg @ref LL_DMA_STREAM_7
1009 __STATIC_INLINE
void LL_DMA_DisableBufferableTransfer(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1011 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1013 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TRBUFF
);
1017 * @brief Set Number of data to transfer.
1018 * @rmtoll NDTR NDT LL_DMA_SetDataLength
1019 * @note This action has no effect if
1020 * stream is enabled.
1021 * @param DMAx DMAx Instance
1022 * @param Stream This parameter can be one of the following values:
1023 * @arg @ref LL_DMA_STREAM_0
1024 * @arg @ref LL_DMA_STREAM_1
1025 * @arg @ref LL_DMA_STREAM_2
1026 * @arg @ref LL_DMA_STREAM_3
1027 * @arg @ref LL_DMA_STREAM_4
1028 * @arg @ref LL_DMA_STREAM_5
1029 * @arg @ref LL_DMA_STREAM_6
1030 * @arg @ref LL_DMA_STREAM_7
1031 * @param NbData Between 0 to 0xFFFFFFFF
1034 __STATIC_INLINE
void LL_DMA_SetDataLength(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t NbData
)
1036 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1038 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->NDTR
, DMA_SxNDT
, NbData
);
1042 * @brief Get Number of data to transfer.
1043 * @rmtoll NDTR NDT LL_DMA_GetDataLength
1044 * @note Once the stream is enabled, the return value indicate the
1045 * remaining bytes to be transmitted.
1046 * @param DMAx DMAx Instance
1047 * @param Stream This parameter can be one of the following values:
1048 * @arg @ref LL_DMA_STREAM_0
1049 * @arg @ref LL_DMA_STREAM_1
1050 * @arg @ref LL_DMA_STREAM_2
1051 * @arg @ref LL_DMA_STREAM_3
1052 * @arg @ref LL_DMA_STREAM_4
1053 * @arg @ref LL_DMA_STREAM_5
1054 * @arg @ref LL_DMA_STREAM_6
1055 * @arg @ref LL_DMA_STREAM_7
1056 * @retval Between 0 to 0xFFFFFFFF
1058 __STATIC_INLINE
uint32_t LL_DMA_GetDataLength(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1060 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1062 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->NDTR
, DMA_SxNDT
));
1065 * @brief Set DMA request for DMA Streams on DMAMUX Channel x.
1066 * @note DMAMUX channel 0 to 7 are mapped to DMA1 stream 0 to 7.
1067 * DMAMUX channel 8 to 15 are mapped to DMA2 stream 0 to 7.
1068 * @rmtoll CxCR DMAREQ_ID LL_DMA_SetPeriphRequest
1069 * @param DMAx DMAx Instance
1070 * @param Stream This parameter can be one of the following values:
1071 * @arg @ref LL_DMA_STREAM_0
1072 * @arg @ref LL_DMA_STREAM_1
1073 * @arg @ref LL_DMA_STREAM_2
1074 * @arg @ref LL_DMA_STREAM_3
1075 * @arg @ref LL_DMA_STREAM_4
1076 * @arg @ref LL_DMA_STREAM_5
1077 * @arg @ref LL_DMA_STREAM_6
1078 * @arg @ref LL_DMA_STREAM_7
1079 * @param Request This parameter can be one of the following values:
1080 * @arg @ref LL_DMAMUX1_REQ_MEM2MEM
1081 * @arg @ref LL_DMAMUX1_REQ_GENERATOR0
1082 * @arg @ref LL_DMAMUX1_REQ_GENERATOR1
1083 * @arg @ref LL_DMAMUX1_REQ_GENERATOR2
1084 * @arg @ref LL_DMAMUX1_REQ_GENERATOR3
1085 * @arg @ref LL_DMAMUX1_REQ_GENERATOR4
1086 * @arg @ref LL_DMAMUX1_REQ_GENERATOR5
1087 * @arg @ref LL_DMAMUX1_REQ_GENERATOR6
1088 * @arg @ref LL_DMAMUX1_REQ_GENERATOR7
1089 * @arg @ref LL_DMAMUX1_REQ_ADC1
1090 * @arg @ref LL_DMAMUX1_REQ_ADC2
1091 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH1
1092 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH2
1093 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH3
1094 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH4
1095 * @arg @ref LL_DMAMUX1_REQ_TIM1_UP
1096 * @arg @ref LL_DMAMUX1_REQ_TIM1_TRIG
1097 * @arg @ref LL_DMAMUX1_REQ_TIM1_COM
1098 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH1
1099 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH2
1100 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH3
1101 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH4
1102 * @arg @ref LL_DMAMUX1_REQ_TIM2_UP
1103 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH1
1104 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH2
1105 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH3
1106 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH4
1107 * @arg @ref LL_DMAMUX1_REQ_TIM3_UP
1108 * @arg @ref LL_DMAMUX1_REQ_TIM3_TRIG
1109 * @arg @ref LL_DMAMUX1_REQ_TIM4_CH1
1110 * @arg @ref LL_DMAMUX1_REQ_TIM4_CH2
1111 * @arg @ref LL_DMAMUX1_REQ_TIM4_CH3
1112 * @arg @ref LL_DMAMUX1_REQ_TIM4_UP
1113 * @arg @ref LL_DMAMUX1_REQ_I2C1_RX
1114 * @arg @ref LL_DMAMUX1_REQ_I2C1_TX
1115 * @arg @ref LL_DMAMUX1_REQ_I2C2_RX
1116 * @arg @ref LL_DMAMUX1_REQ_I2C2_TX
1117 * @arg @ref LL_DMAMUX1_REQ_SPI1_RX
1118 * @arg @ref LL_DMAMUX1_REQ_SPI1_TX
1119 * @arg @ref LL_DMAMUX1_REQ_SPI2_RX
1120 * @arg @ref LL_DMAMUX1_REQ_SPI2_TX
1121 * @arg @ref LL_DMAMUX1_REQ_USART1_RX
1122 * @arg @ref LL_DMAMUX1_REQ_USART1_TX
1123 * @arg @ref LL_DMAMUX1_REQ_USART2_RX
1124 * @arg @ref LL_DMAMUX1_REQ_USART2_TX
1125 * @arg @ref LL_DMAMUX1_REQ_USART3_RX
1126 * @arg @ref LL_DMAMUX1_REQ_USART3_TX
1127 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH1
1128 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH2
1129 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH3
1130 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH4
1131 * @arg @ref LL_DMAMUX1_REQ_TIM8_UP
1132 * @arg @ref LL_DMAMUX1_REQ_TIM8_TRIG
1133 * @arg @ref LL_DMAMUX1_REQ_TIM8_COM
1134 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH1
1135 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH2
1136 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH3
1137 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH4
1138 * @arg @ref LL_DMAMUX1_REQ_TIM5_UP
1139 * @arg @ref LL_DMAMUX1_REQ_TIM5_TRIG
1140 * @arg @ref LL_DMAMUX1_REQ_SPI3_RX
1141 * @arg @ref LL_DMAMUX1_REQ_SPI3_TX
1142 * @arg @ref LL_DMAMUX1_REQ_UART4_RX
1143 * @arg @ref LL_DMAMUX1_REQ_UART4_TX
1144 * @arg @ref LL_DMAMUX1_REQ_UART5_RX
1145 * @arg @ref LL_DMAMUX1_REQ_UART5_TX
1146 * @arg @ref LL_DMAMUX1_REQ_DAC1_CH1
1147 * @arg @ref LL_DMAMUX1_REQ_DAC1_CH2
1148 * @arg @ref LL_DMAMUX1_REQ_TIM6_UP
1149 * @arg @ref LL_DMAMUX1_REQ_TIM7_UP
1150 * @arg @ref LL_DMAMUX1_REQ_USART6_RX
1151 * @arg @ref LL_DMAMUX1_REQ_USART6_TX
1152 * @arg @ref LL_DMAMUX1_REQ_I2C3_RX
1153 * @arg @ref LL_DMAMUX1_REQ_I2C3_TX
1154 * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI (*)
1155 * @arg @ref LL_DMAMUX1_REQ_CRYP_IN
1156 * @arg @ref LL_DMAMUX1_REQ_CRYP_OUT
1157 * @arg @ref LL_DMAMUX1_REQ_HASH_IN
1158 * @arg @ref LL_DMAMUX1_REQ_UART7_RX
1159 * @arg @ref LL_DMAMUX1_REQ_UART7_TX
1160 * @arg @ref LL_DMAMUX1_REQ_UART8_RX
1161 * @arg @ref LL_DMAMUX1_REQ_UART8_TX
1162 * @arg @ref LL_DMAMUX1_REQ_SPI4_RX
1163 * @arg @ref LL_DMAMUX1_REQ_SPI4_TX
1164 * @arg @ref LL_DMAMUX1_REQ_SPI5_RX
1165 * @arg @ref LL_DMAMUX1_REQ_SPI5_TX
1166 * @arg @ref LL_DMAMUX1_REQ_SAI1_A
1167 * @arg @ref LL_DMAMUX1_REQ_SAI1_B
1168 * @arg @ref LL_DMAMUX1_REQ_SAI2_A (*)
1169 * @arg @ref LL_DMAMUX1_REQ_SAI2_B (*)
1170 * @arg @ref LL_DMAMUX1_REQ_SWPMI_RX
1171 * @arg @ref LL_DMAMUX1_REQ_SWPMI_TX
1172 * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_DT
1173 * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_CS
1174 * @arg @ref LL_DMAMUX1_REQ_HRTIM_MASTER (*)
1175 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_A (*)
1176 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_B (*)
1177 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_C (*)
1178 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_D (*)
1179 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_E (*)
1180 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT0
1181 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT1
1182 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT2
1183 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT3
1184 * @arg @ref LL_DMAMUX1_REQ_TIM15_CH1
1185 * @arg @ref LL_DMAMUX1_REQ_TIM15_UP
1186 * @arg @ref LL_DMAMUX1_REQ_TIM15_TRIG
1187 * @arg @ref LL_DMAMUX1_REQ_TIM15_COM
1188 * @arg @ref LL_DMAMUX1_REQ_TIM16_CH1
1189 * @arg @ref LL_DMAMUX1_REQ_TIM16_UP
1190 * @arg @ref LL_DMAMUX1_REQ_TIM17_CH1
1191 * @arg @ref LL_DMAMUX1_REQ_TIM17_UP
1192 * @arg @ref LL_DMAMUX1_REQ_SAI3_A (*)
1193 * @arg @ref LL_DMAMUX1_REQ_SAI3_B (*)
1194 * @arg @ref LL_DMAMUX1_REQ_ADC3 (*)
1195 * @arg @ref LL_DMAMUX1_REQ_UART9_RX (*)
1196 * @arg @ref LL_DMAMUX1_REQ_UART9_TX (*)
1197 * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*)
1198 * @arg @ref LL_DMAMUX1_REQ_USART10_TX (*)
1199 * @arg @ref LL_DMAMUX1_REQ_FMAC_READ (*)
1200 * @arg @ref LL_DMAMUX1_REQ_FMAC_WRITE (*)
1201 * @arg @ref LL_DMAMUX1_REQ_CORDIC_READ (*)
1202 * @arg @ref LL_DMAMUX1_REQ_CORDIC_WRITE(*)
1203 * @arg @ref LL_DMAMUX1_REQ_I2C5_RX (*)
1204 * @arg @ref LL_DMAMUX1_REQ_I2C5_TX (*)
1205 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH1 (*)
1206 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH2 (*)
1207 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH3 (*)
1208 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH4 (*)
1209 * @arg @ref LL_DMAMUX1_REQ_TIM23_UP (*)
1210 * @arg @ref LL_DMAMUX1_REQ_TIM23_TRIG (*)
1211 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH1 (*)
1212 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH2 (*)
1213 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH3 (*)
1214 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH4 (*)
1215 * @arg @ref LL_DMAMUX1_REQ_TIM24_UP (*)
1216 * @arg @ref LL_DMAMUX1_REQ_TIM24_TRIG (*)
1218 * @note (*) Availability depends on devices.
1221 __STATIC_INLINE
void LL_DMA_SetPeriphRequest(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Request
)
1223 MODIFY_REG(((DMAMUX_Channel_TypeDef
*)(uint32_t)((uint32_t)DMAMUX1_Channel0
+ (DMAMUX_CCR_SIZE
* (Stream
)) + (uint32_t)(DMAMUX_CCR_SIZE
* LL_DMA_INSTANCE_TO_DMAMUX_CHANNEL(DMAx
))))->CCR
, DMAMUX_CxCR_DMAREQ_ID
, Request
);
1227 * @brief Get DMA request for DMA Channels on DMAMUX Channel x.
1228 * @note DMAMUX channel 0 to 7 are mapped to DMA1 stream 0 to 7.
1229 * DMAMUX channel 8 to 15 are mapped to DMA2 stream 0 to 7.
1230 * @rmtoll CxCR DMAREQ_ID LL_DMA_GetPeriphRequest
1231 * @param DMAx DMAx Instance
1232 * @param Stream This parameter can be one of the following values:
1233 * @arg @ref LL_DMA_STREAM_0
1234 * @arg @ref LL_DMA_STREAM_1
1235 * @arg @ref LL_DMA_STREAM_2
1236 * @arg @ref LL_DMA_STREAM_3
1237 * @arg @ref LL_DMA_STREAM_4
1238 * @arg @ref LL_DMA_STREAM_5
1239 * @arg @ref LL_DMA_STREAM_6
1240 * @arg @ref LL_DMA_STREAM_7
1241 * @retval Returned value can be one of the following values:
1242 * @arg @ref LL_DMAMUX1_REQ_MEM2MEM
1243 * @arg @ref LL_DMAMUX1_REQ_GENERATOR0
1244 * @arg @ref LL_DMAMUX1_REQ_GENERATOR1
1245 * @arg @ref LL_DMAMUX1_REQ_GENERATOR2
1246 * @arg @ref LL_DMAMUX1_REQ_GENERATOR3
1247 * @arg @ref LL_DMAMUX1_REQ_GENERATOR4
1248 * @arg @ref LL_DMAMUX1_REQ_GENERATOR5
1249 * @arg @ref LL_DMAMUX1_REQ_GENERATOR6
1250 * @arg @ref LL_DMAMUX1_REQ_GENERATOR7
1251 * @arg @ref LL_DMAMUX1_REQ_ADC1
1252 * @arg @ref LL_DMAMUX1_REQ_ADC2
1253 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH1
1254 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH2
1255 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH3
1256 * @arg @ref LL_DMAMUX1_REQ_TIM1_CH4
1257 * @arg @ref LL_DMAMUX1_REQ_TIM1_UP
1258 * @arg @ref LL_DMAMUX1_REQ_TIM1_TRIG
1259 * @arg @ref LL_DMAMUX1_REQ_TIM1_COM
1260 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH1
1261 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH2
1262 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH3
1263 * @arg @ref LL_DMAMUX1_REQ_TIM2_CH4
1264 * @arg @ref LL_DMAMUX1_REQ_TIM2_UP
1265 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH1
1266 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH2
1267 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH3
1268 * @arg @ref LL_DMAMUX1_REQ_TIM3_CH4
1269 * @arg @ref LL_DMAMUX1_REQ_TIM3_UP
1270 * @arg @ref LL_DMAMUX1_REQ_TIM3_TRIG
1271 * @arg @ref LL_DMAMUX1_REQ_TIM4_CH1
1272 * @arg @ref LL_DMAMUX1_REQ_TIM4_CH2
1273 * @arg @ref LL_DMAMUX1_REQ_TIM4_CH3
1274 * @arg @ref LL_DMAMUX1_REQ_TIM4_UP
1275 * @arg @ref LL_DMAMUX1_REQ_I2C1_RX
1276 * @arg @ref LL_DMAMUX1_REQ_I2C1_TX
1277 * @arg @ref LL_DMAMUX1_REQ_I2C2_RX
1278 * @arg @ref LL_DMAMUX1_REQ_I2C2_TX
1279 * @arg @ref LL_DMAMUX1_REQ_SPI1_RX
1280 * @arg @ref LL_DMAMUX1_REQ_SPI1_TX
1281 * @arg @ref LL_DMAMUX1_REQ_SPI2_RX
1282 * @arg @ref LL_DMAMUX1_REQ_SPI2_TX
1283 * @arg @ref LL_DMAMUX1_REQ_USART1_RX
1284 * @arg @ref LL_DMAMUX1_REQ_USART1_TX
1285 * @arg @ref LL_DMAMUX1_REQ_USART2_RX
1286 * @arg @ref LL_DMAMUX1_REQ_USART2_TX
1287 * @arg @ref LL_DMAMUX1_REQ_USART3_RX
1288 * @arg @ref LL_DMAMUX1_REQ_USART3_TX
1289 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH1
1290 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH2
1291 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH3
1292 * @arg @ref LL_DMAMUX1_REQ_TIM8_CH4
1293 * @arg @ref LL_DMAMUX1_REQ_TIM8_UP
1294 * @arg @ref LL_DMAMUX1_REQ_TIM8_TRIG
1295 * @arg @ref LL_DMAMUX1_REQ_TIM8_COM
1296 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH1
1297 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH2
1298 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH3
1299 * @arg @ref LL_DMAMUX1_REQ_TIM5_CH4
1300 * @arg @ref LL_DMAMUX1_REQ_TIM5_UP
1301 * @arg @ref LL_DMAMUX1_REQ_TIM5_TRIG
1302 * @arg @ref LL_DMAMUX1_REQ_SPI3_RX
1303 * @arg @ref LL_DMAMUX1_REQ_SPI3_TX
1304 * @arg @ref LL_DMAMUX1_REQ_UART4_RX
1305 * @arg @ref LL_DMAMUX1_REQ_UART4_TX
1306 * @arg @ref LL_DMAMUX1_REQ_UART5_RX
1307 * @arg @ref LL_DMAMUX1_REQ_UART5_TX
1308 * @arg @ref LL_DMAMUX1_REQ_DAC1_CH1
1309 * @arg @ref LL_DMAMUX1_REQ_DAC1_CH2
1310 * @arg @ref LL_DMAMUX1_REQ_TIM6_UP
1311 * @arg @ref LL_DMAMUX1_REQ_TIM7_UP
1312 * @arg @ref LL_DMAMUX1_REQ_USART6_RX
1313 * @arg @ref LL_DMAMUX1_REQ_USART6_TX
1314 * @arg @ref LL_DMAMUX1_REQ_I2C3_RX
1315 * @arg @ref LL_DMAMUX1_REQ_I2C3_TX
1316 * @arg @ref LL_DMAMUX1_REQ_DCMI_PSSI (*)
1317 * @arg @ref LL_DMAMUX1_REQ_CRYP_IN
1318 * @arg @ref LL_DMAMUX1_REQ_CRYP_OUT
1319 * @arg @ref LL_DMAMUX1_REQ_HASH_IN
1320 * @arg @ref LL_DMAMUX1_REQ_UART7_RX
1321 * @arg @ref LL_DMAMUX1_REQ_UART7_TX
1322 * @arg @ref LL_DMAMUX1_REQ_UART8_RX
1323 * @arg @ref LL_DMAMUX1_REQ_UART8_TX
1324 * @arg @ref LL_DMAMUX1_REQ_SPI4_RX
1325 * @arg @ref LL_DMAMUX1_REQ_SPI4_TX
1326 * @arg @ref LL_DMAMUX1_REQ_SPI5_RX
1327 * @arg @ref LL_DMAMUX1_REQ_SPI5_TX
1328 * @arg @ref LL_DMAMUX1_REQ_SAI1_A
1329 * @arg @ref LL_DMAMUX1_REQ_SAI1_B
1330 * @arg @ref LL_DMAMUX1_REQ_SAI2_A (*)
1331 * @arg @ref LL_DMAMUX1_REQ_SAI2_B (*)
1332 * @arg @ref LL_DMAMUX1_REQ_SWPMI_RX
1333 * @arg @ref LL_DMAMUX1_REQ_SWPMI_TX
1334 * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_DT
1335 * @arg @ref LL_DMAMUX1_REQ_SPDIF_RX_CS
1336 * @arg @ref LL_DMAMUX1_REQ_HRTIM_MASTER (*)
1337 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_A (*)
1338 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_B (*)
1339 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_C (*)
1340 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_D (*)
1341 * @arg @ref LL_DMAMUX1_REQ_HRTIM_TIMER_E (*)
1342 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT0
1343 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT1
1344 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT2
1345 * @arg @ref LL_DMAMUX1_REQ_DFSDM1_FLT3
1346 * @arg @ref LL_DMAMUX1_REQ_TIM15_CH1
1347 * @arg @ref LL_DMAMUX1_REQ_TIM15_UP
1348 * @arg @ref LL_DMAMUX1_REQ_TIM15_TRIG
1349 * @arg @ref LL_DMAMUX1_REQ_TIM15_COM
1350 * @arg @ref LL_DMAMUX1_REQ_TIM16_CH1
1351 * @arg @ref LL_DMAMUX1_REQ_TIM16_UP
1352 * @arg @ref LL_DMAMUX1_REQ_TIM17_CH1
1353 * @arg @ref LL_DMAMUX1_REQ_TIM17_UP
1354 * @arg @ref LL_DMAMUX1_REQ_SAI3_A (*)
1355 * @arg @ref LL_DMAMUX1_REQ_SAI3_B (*)
1356 * @arg @ref LL_DMAMUX1_REQ_ADC3 (*)
1357 * @arg @ref LL_DMAMUX1_REQ_UART9_RX (*)
1358 * @arg @ref LL_DMAMUX1_REQ_UART9_TX (*)
1359 * @arg @ref LL_DMAMUX1_REQ_USART10_RX (*)
1360 * @arg @ref LL_DMAMUX1_REQ_USART10_TX (*)
1361 * @arg @ref LL_DMAMUX1_REQ_FMAC_READ (*)
1362 * @arg @ref LL_DMAMUX1_REQ_FMAC_WRITE (*)
1363 * @arg @ref LL_DMAMUX1_REQ_CORDIC_READ (*)
1364 * @arg @ref LL_DMAMUX1_REQ_CORDIC_WRITE(*)
1365 * @arg @ref LL_DMAMUX1_REQ_I2C5_RX (*)
1366 * @arg @ref LL_DMAMUX1_REQ_I2C5_TX (*)
1367 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH1 (*)
1368 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH2 (*)
1369 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH3 (*)
1370 * @arg @ref LL_DMAMUX1_REQ_TIM23_CH4 (*)
1371 * @arg @ref LL_DMAMUX1_REQ_TIM23_UP (*)
1372 * @arg @ref LL_DMAMUX1_REQ_TIM23_TRIG (*)
1373 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH1 (*)
1374 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH2 (*)
1375 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH3 (*)
1376 * @arg @ref LL_DMAMUX1_REQ_TIM24_CH4 (*)
1377 * @arg @ref LL_DMAMUX1_REQ_TIM24_UP (*)
1378 * @arg @ref LL_DMAMUX1_REQ_TIM24_TRIG (*)
1380 * @note (*) Availability depends on devices.
1382 __STATIC_INLINE
uint32_t LL_DMA_GetPeriphRequest(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1384 return (READ_BIT(((DMAMUX_Channel_TypeDef
*)((uint32_t)((uint32_t)DMAMUX1_Channel0
+ (DMAMUX_CCR_SIZE
* (Stream
)) + (uint32_t)(DMAMUX_CCR_SIZE
* LL_DMA_INSTANCE_TO_DMAMUX_CHANNEL(DMAx
)))))->CCR
, DMAMUX_CxCR_DMAREQ_ID
));
1388 * @brief Set Memory burst transfer configuration.
1389 * @rmtoll CR MBURST LL_DMA_SetMemoryBurstxfer
1390 * @param DMAx DMAx Instance
1391 * @param Stream This parameter can be one of the following values:
1392 * @arg @ref LL_DMA_STREAM_0
1393 * @arg @ref LL_DMA_STREAM_1
1394 * @arg @ref LL_DMA_STREAM_2
1395 * @arg @ref LL_DMA_STREAM_3
1396 * @arg @ref LL_DMA_STREAM_4
1397 * @arg @ref LL_DMA_STREAM_5
1398 * @arg @ref LL_DMA_STREAM_6
1399 * @arg @ref LL_DMA_STREAM_7
1400 * @param Mburst This parameter can be one of the following values:
1401 * @arg @ref LL_DMA_MBURST_SINGLE
1402 * @arg @ref LL_DMA_MBURST_INC4
1403 * @arg @ref LL_DMA_MBURST_INC8
1404 * @arg @ref LL_DMA_MBURST_INC16
1407 __STATIC_INLINE
void LL_DMA_SetMemoryBurstxfer(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Mburst
)
1409 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1411 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_MBURST
, Mburst
);
1415 * @brief Get Memory burst transfer configuration.
1416 * @rmtoll CR MBURST LL_DMA_GetMemoryBurstxfer
1417 * @param DMAx DMAx Instance
1418 * @param Stream This parameter can be one of the following values:
1419 * @arg @ref LL_DMA_STREAM_0
1420 * @arg @ref LL_DMA_STREAM_1
1421 * @arg @ref LL_DMA_STREAM_2
1422 * @arg @ref LL_DMA_STREAM_3
1423 * @arg @ref LL_DMA_STREAM_4
1424 * @arg @ref LL_DMA_STREAM_5
1425 * @arg @ref LL_DMA_STREAM_6
1426 * @arg @ref LL_DMA_STREAM_7
1427 * @retval Returned value can be one of the following values:
1428 * @arg @ref LL_DMA_MBURST_SINGLE
1429 * @arg @ref LL_DMA_MBURST_INC4
1430 * @arg @ref LL_DMA_MBURST_INC8
1431 * @arg @ref LL_DMA_MBURST_INC16
1433 __STATIC_INLINE
uint32_t LL_DMA_GetMemoryBurstxfer(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1435 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1437 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_MBURST
));
1441 * @brief Set Peripheral burst transfer configuration.
1442 * @rmtoll CR PBURST LL_DMA_SetPeriphBurstxfer
1443 * @param DMAx DMAx Instance
1444 * @param Stream This parameter can be one of the following values:
1445 * @arg @ref LL_DMA_STREAM_0
1446 * @arg @ref LL_DMA_STREAM_1
1447 * @arg @ref LL_DMA_STREAM_2
1448 * @arg @ref LL_DMA_STREAM_3
1449 * @arg @ref LL_DMA_STREAM_4
1450 * @arg @ref LL_DMA_STREAM_5
1451 * @arg @ref LL_DMA_STREAM_6
1452 * @arg @ref LL_DMA_STREAM_7
1453 * @param Pburst This parameter can be one of the following values:
1454 * @arg @ref LL_DMA_PBURST_SINGLE
1455 * @arg @ref LL_DMA_PBURST_INC4
1456 * @arg @ref LL_DMA_PBURST_INC8
1457 * @arg @ref LL_DMA_PBURST_INC16
1460 __STATIC_INLINE
void LL_DMA_SetPeriphBurstxfer(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Pburst
)
1462 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1464 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PBURST
, Pburst
);
1468 * @brief Get Peripheral burst transfer configuration.
1469 * @rmtoll CR PBURST LL_DMA_GetPeriphBurstxfer
1470 * @param DMAx DMAx Instance
1471 * @param Stream This parameter can be one of the following values:
1472 * @arg @ref LL_DMA_STREAM_0
1473 * @arg @ref LL_DMA_STREAM_1
1474 * @arg @ref LL_DMA_STREAM_2
1475 * @arg @ref LL_DMA_STREAM_3
1476 * @arg @ref LL_DMA_STREAM_4
1477 * @arg @ref LL_DMA_STREAM_5
1478 * @arg @ref LL_DMA_STREAM_6
1479 * @arg @ref LL_DMA_STREAM_7
1480 * @retval Returned value can be one of the following values:
1481 * @arg @ref LL_DMA_PBURST_SINGLE
1482 * @arg @ref LL_DMA_PBURST_INC4
1483 * @arg @ref LL_DMA_PBURST_INC8
1484 * @arg @ref LL_DMA_PBURST_INC16
1486 __STATIC_INLINE
uint32_t LL_DMA_GetPeriphBurstxfer(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1488 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1490 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_PBURST
));
1494 * @brief Set Current target (only in double buffer mode) to Memory 1 or Memory 0.
1495 * @rmtoll CR CT LL_DMA_SetCurrentTargetMem
1496 * @param DMAx DMAx Instance
1497 * @param Stream This parameter can be one of the following values:
1498 * @arg @ref LL_DMA_STREAM_0
1499 * @arg @ref LL_DMA_STREAM_1
1500 * @arg @ref LL_DMA_STREAM_2
1501 * @arg @ref LL_DMA_STREAM_3
1502 * @arg @ref LL_DMA_STREAM_4
1503 * @arg @ref LL_DMA_STREAM_5
1504 * @arg @ref LL_DMA_STREAM_6
1505 * @arg @ref LL_DMA_STREAM_7
1506 * @param CurrentMemory This parameter can be one of the following values:
1507 * @arg @ref LL_DMA_CURRENTTARGETMEM0
1508 * @arg @ref LL_DMA_CURRENTTARGETMEM1
1511 __STATIC_INLINE
void LL_DMA_SetCurrentTargetMem(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t CurrentMemory
)
1513 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1515 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_CT
, CurrentMemory
);
1519 * @brief Set Current target (only in double buffer mode) to Memory 1 or Memory 0.
1520 * @rmtoll CR CT LL_DMA_GetCurrentTargetMem
1521 * @param DMAx DMAx Instance
1522 * @param Stream This parameter can be one of the following values:
1523 * @arg @ref LL_DMA_STREAM_0
1524 * @arg @ref LL_DMA_STREAM_1
1525 * @arg @ref LL_DMA_STREAM_2
1526 * @arg @ref LL_DMA_STREAM_3
1527 * @arg @ref LL_DMA_STREAM_4
1528 * @arg @ref LL_DMA_STREAM_5
1529 * @arg @ref LL_DMA_STREAM_6
1530 * @arg @ref LL_DMA_STREAM_7
1531 * @retval Returned value can be one of the following values:
1532 * @arg @ref LL_DMA_CURRENTTARGETMEM0
1533 * @arg @ref LL_DMA_CURRENTTARGETMEM1
1535 __STATIC_INLINE
uint32_t LL_DMA_GetCurrentTargetMem(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1537 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1539 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_CT
));
1543 * @brief Enable the double buffer mode.
1544 * @rmtoll CR DBM LL_DMA_EnableDoubleBufferMode
1545 * @param DMAx DMAx Instance
1546 * @param Stream This parameter can be one of the following values:
1547 * @arg @ref LL_DMA_STREAM_0
1548 * @arg @ref LL_DMA_STREAM_1
1549 * @arg @ref LL_DMA_STREAM_2
1550 * @arg @ref LL_DMA_STREAM_3
1551 * @arg @ref LL_DMA_STREAM_4
1552 * @arg @ref LL_DMA_STREAM_5
1553 * @arg @ref LL_DMA_STREAM_6
1554 * @arg @ref LL_DMA_STREAM_7
1557 __STATIC_INLINE
void LL_DMA_EnableDoubleBufferMode(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1559 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1561 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_DBM
);
1565 * @brief Disable the double buffer mode.
1566 * @rmtoll CR DBM LL_DMA_DisableDoubleBufferMode
1567 * @param DMAx DMAx Instance
1568 * @param Stream This parameter can be one of the following values:
1569 * @arg @ref LL_DMA_STREAM_0
1570 * @arg @ref LL_DMA_STREAM_1
1571 * @arg @ref LL_DMA_STREAM_2
1572 * @arg @ref LL_DMA_STREAM_3
1573 * @arg @ref LL_DMA_STREAM_4
1574 * @arg @ref LL_DMA_STREAM_5
1575 * @arg @ref LL_DMA_STREAM_6
1576 * @arg @ref LL_DMA_STREAM_7
1579 __STATIC_INLINE
void LL_DMA_DisableDoubleBufferMode(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1581 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1583 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_DBM
);
1587 * @brief Get FIFO status.
1588 * @rmtoll FCR FS LL_DMA_GetFIFOStatus
1589 * @param DMAx DMAx Instance
1590 * @param Stream This parameter can be one of the following values:
1591 * @arg @ref LL_DMA_STREAM_0
1592 * @arg @ref LL_DMA_STREAM_1
1593 * @arg @ref LL_DMA_STREAM_2
1594 * @arg @ref LL_DMA_STREAM_3
1595 * @arg @ref LL_DMA_STREAM_4
1596 * @arg @ref LL_DMA_STREAM_5
1597 * @arg @ref LL_DMA_STREAM_6
1598 * @arg @ref LL_DMA_STREAM_7
1599 * @retval Returned value can be one of the following values:
1600 * @arg @ref LL_DMA_FIFOSTATUS_0_25
1601 * @arg @ref LL_DMA_FIFOSTATUS_25_50
1602 * @arg @ref LL_DMA_FIFOSTATUS_50_75
1603 * @arg @ref LL_DMA_FIFOSTATUS_75_100
1604 * @arg @ref LL_DMA_FIFOSTATUS_EMPTY
1605 * @arg @ref LL_DMA_FIFOSTATUS_FULL
1607 __STATIC_INLINE
uint32_t LL_DMA_GetFIFOStatus(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1609 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1611 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_FS
));
1615 * @brief Disable Fifo mode.
1616 * @rmtoll FCR DMDIS LL_DMA_DisableFifoMode
1617 * @param DMAx DMAx Instance
1618 * @param Stream This parameter can be one of the following values:
1619 * @arg @ref LL_DMA_STREAM_0
1620 * @arg @ref LL_DMA_STREAM_1
1621 * @arg @ref LL_DMA_STREAM_2
1622 * @arg @ref LL_DMA_STREAM_3
1623 * @arg @ref LL_DMA_STREAM_4
1624 * @arg @ref LL_DMA_STREAM_5
1625 * @arg @ref LL_DMA_STREAM_6
1626 * @arg @ref LL_DMA_STREAM_7
1629 __STATIC_INLINE
void LL_DMA_DisableFifoMode(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1631 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1633 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_DMDIS
);
1637 * @brief Enable Fifo mode.
1638 * @rmtoll FCR DMDIS LL_DMA_EnableFifoMode
1639 * @param DMAx DMAx Instance
1640 * @param Stream This parameter can be one of the following values:
1641 * @arg @ref LL_DMA_STREAM_0
1642 * @arg @ref LL_DMA_STREAM_1
1643 * @arg @ref LL_DMA_STREAM_2
1644 * @arg @ref LL_DMA_STREAM_3
1645 * @arg @ref LL_DMA_STREAM_4
1646 * @arg @ref LL_DMA_STREAM_5
1647 * @arg @ref LL_DMA_STREAM_6
1648 * @arg @ref LL_DMA_STREAM_7
1651 __STATIC_INLINE
void LL_DMA_EnableFifoMode(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1653 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1655 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_DMDIS
);
1659 * @brief Select FIFO threshold.
1660 * @rmtoll FCR FTH LL_DMA_SetFIFOThreshold
1661 * @param DMAx DMAx Instance
1662 * @param Stream This parameter can be one of the following values:
1663 * @arg @ref LL_DMA_STREAM_0
1664 * @arg @ref LL_DMA_STREAM_1
1665 * @arg @ref LL_DMA_STREAM_2
1666 * @arg @ref LL_DMA_STREAM_3
1667 * @arg @ref LL_DMA_STREAM_4
1668 * @arg @ref LL_DMA_STREAM_5
1669 * @arg @ref LL_DMA_STREAM_6
1670 * @arg @ref LL_DMA_STREAM_7
1671 * @param Threshold This parameter can be one of the following values:
1672 * @arg @ref LL_DMA_FIFOTHRESHOLD_1_4
1673 * @arg @ref LL_DMA_FIFOTHRESHOLD_1_2
1674 * @arg @ref LL_DMA_FIFOTHRESHOLD_3_4
1675 * @arg @ref LL_DMA_FIFOTHRESHOLD_FULL
1678 __STATIC_INLINE
void LL_DMA_SetFIFOThreshold(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Threshold
)
1680 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1682 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_FTH
, Threshold
);
1686 * @brief Get FIFO threshold.
1687 * @rmtoll FCR FTH LL_DMA_GetFIFOThreshold
1688 * @param DMAx DMAx Instance
1689 * @param Stream This parameter can be one of the following values:
1690 * @arg @ref LL_DMA_STREAM_0
1691 * @arg @ref LL_DMA_STREAM_1
1692 * @arg @ref LL_DMA_STREAM_2
1693 * @arg @ref LL_DMA_STREAM_3
1694 * @arg @ref LL_DMA_STREAM_4
1695 * @arg @ref LL_DMA_STREAM_5
1696 * @arg @ref LL_DMA_STREAM_6
1697 * @arg @ref LL_DMA_STREAM_7
1698 * @retval Returned value can be one of the following values:
1699 * @arg @ref LL_DMA_FIFOTHRESHOLD_1_4
1700 * @arg @ref LL_DMA_FIFOTHRESHOLD_1_2
1701 * @arg @ref LL_DMA_FIFOTHRESHOLD_3_4
1702 * @arg @ref LL_DMA_FIFOTHRESHOLD_FULL
1704 __STATIC_INLINE
uint32_t LL_DMA_GetFIFOThreshold(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1706 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1708 return (READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_FTH
));
1712 * @brief Configure the FIFO .
1713 * @rmtoll FCR FTH LL_DMA_ConfigFifo\n
1714 * FCR DMDIS LL_DMA_ConfigFifo
1715 * @param DMAx DMAx Instance
1716 * @param Stream This parameter can be one of the following values:
1717 * @arg @ref LL_DMA_STREAM_0
1718 * @arg @ref LL_DMA_STREAM_1
1719 * @arg @ref LL_DMA_STREAM_2
1720 * @arg @ref LL_DMA_STREAM_3
1721 * @arg @ref LL_DMA_STREAM_4
1722 * @arg @ref LL_DMA_STREAM_5
1723 * @arg @ref LL_DMA_STREAM_6
1724 * @arg @ref LL_DMA_STREAM_7
1725 * @param FifoMode This parameter can be one of the following values:
1726 * @arg @ref LL_DMA_FIFOMODE_ENABLE
1727 * @arg @ref LL_DMA_FIFOMODE_DISABLE
1728 * @param FifoThreshold This parameter can be one of the following values:
1729 * @arg @ref LL_DMA_FIFOTHRESHOLD_1_4
1730 * @arg @ref LL_DMA_FIFOTHRESHOLD_1_2
1731 * @arg @ref LL_DMA_FIFOTHRESHOLD_3_4
1732 * @arg @ref LL_DMA_FIFOTHRESHOLD_FULL
1735 __STATIC_INLINE
void LL_DMA_ConfigFifo(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t FifoMode
, uint32_t FifoThreshold
)
1737 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1739 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_FTH
| DMA_SxFCR_DMDIS
, FifoMode
| FifoThreshold
);
1743 * @brief Configure the Source and Destination addresses.
1744 * @note This API must not be called when the DMA stream is enabled.
1745 * @rmtoll M0AR M0A LL_DMA_ConfigAddresses\n
1746 * PAR PA LL_DMA_ConfigAddresses
1747 * @param DMAx DMAx Instance
1748 * @param Stream This parameter can be one of the following values:
1749 * @arg @ref LL_DMA_STREAM_0
1750 * @arg @ref LL_DMA_STREAM_1
1751 * @arg @ref LL_DMA_STREAM_2
1752 * @arg @ref LL_DMA_STREAM_3
1753 * @arg @ref LL_DMA_STREAM_4
1754 * @arg @ref LL_DMA_STREAM_5
1755 * @arg @ref LL_DMA_STREAM_6
1756 * @arg @ref LL_DMA_STREAM_7
1757 * @param SrcAddress Between 0 to 0xFFFFFFFF
1758 * @param DstAddress Between 0 to 0xFFFFFFFF
1759 * @param Direction This parameter can be one of the following values:
1760 * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY
1761 * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH
1762 * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY
1765 __STATIC_INLINE
void LL_DMA_ConfigAddresses(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t SrcAddress
, uint32_t DstAddress
, uint32_t Direction
)
1767 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1769 /* Direction Memory to Periph */
1770 if (Direction
== LL_DMA_DIRECTION_MEMORY_TO_PERIPH
)
1772 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M0AR
, SrcAddress
);
1773 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->PAR
, DstAddress
);
1775 /* Direction Periph to Memory and Memory to Memory */
1778 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->PAR
, SrcAddress
);
1779 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M0AR
, DstAddress
);
1784 * @brief Set the Memory address.
1785 * @rmtoll M0AR M0A LL_DMA_SetMemoryAddress
1786 * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
1787 * @note This API must not be called when the DMA stream is enabled.
1788 * @param DMAx DMAx Instance
1789 * @param Stream This parameter can be one of the following values:
1790 * @arg @ref LL_DMA_STREAM_0
1791 * @arg @ref LL_DMA_STREAM_1
1792 * @arg @ref LL_DMA_STREAM_2
1793 * @arg @ref LL_DMA_STREAM_3
1794 * @arg @ref LL_DMA_STREAM_4
1795 * @arg @ref LL_DMA_STREAM_5
1796 * @arg @ref LL_DMA_STREAM_6
1797 * @arg @ref LL_DMA_STREAM_7
1798 * @param MemoryAddress Between 0 to 0xFFFFFFFF
1801 __STATIC_INLINE
void LL_DMA_SetMemoryAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t MemoryAddress
)
1803 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1805 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M0AR
, MemoryAddress
);
1809 * @brief Set the Peripheral address.
1810 * @rmtoll PAR PA LL_DMA_SetPeriphAddress
1811 * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
1812 * @note This API must not be called when the DMA stream is enabled.
1813 * @param DMAx DMAx Instance
1814 * @param Stream This parameter can be one of the following values:
1815 * @arg @ref LL_DMA_STREAM_0
1816 * @arg @ref LL_DMA_STREAM_1
1817 * @arg @ref LL_DMA_STREAM_2
1818 * @arg @ref LL_DMA_STREAM_3
1819 * @arg @ref LL_DMA_STREAM_4
1820 * @arg @ref LL_DMA_STREAM_5
1821 * @arg @ref LL_DMA_STREAM_6
1822 * @arg @ref LL_DMA_STREAM_7
1823 * @param PeriphAddress Between 0 to 0xFFFFFFFF
1826 __STATIC_INLINE
void LL_DMA_SetPeriphAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t PeriphAddress
)
1828 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1830 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->PAR
, PeriphAddress
);
1834 * @brief Get the Memory address.
1835 * @rmtoll M0AR M0A LL_DMA_GetMemoryAddress
1836 * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
1837 * @param DMAx DMAx Instance
1838 * @param Stream This parameter can be one of the following values:
1839 * @arg @ref LL_DMA_STREAM_0
1840 * @arg @ref LL_DMA_STREAM_1
1841 * @arg @ref LL_DMA_STREAM_2
1842 * @arg @ref LL_DMA_STREAM_3
1843 * @arg @ref LL_DMA_STREAM_4
1844 * @arg @ref LL_DMA_STREAM_5
1845 * @arg @ref LL_DMA_STREAM_6
1846 * @arg @ref LL_DMA_STREAM_7
1847 * @retval Between 0 to 0xFFFFFFFF
1849 __STATIC_INLINE
uint32_t LL_DMA_GetMemoryAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1851 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1853 return (READ_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M0AR
));
1857 * @brief Get the Peripheral address.
1858 * @rmtoll PAR PA LL_DMA_GetPeriphAddress
1859 * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
1860 * @param DMAx DMAx Instance
1861 * @param Stream This parameter can be one of the following values:
1862 * @arg @ref LL_DMA_STREAM_0
1863 * @arg @ref LL_DMA_STREAM_1
1864 * @arg @ref LL_DMA_STREAM_2
1865 * @arg @ref LL_DMA_STREAM_3
1866 * @arg @ref LL_DMA_STREAM_4
1867 * @arg @ref LL_DMA_STREAM_5
1868 * @arg @ref LL_DMA_STREAM_6
1869 * @arg @ref LL_DMA_STREAM_7
1870 * @retval Between 0 to 0xFFFFFFFF
1872 __STATIC_INLINE
uint32_t LL_DMA_GetPeriphAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1874 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1876 return (READ_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->PAR
));
1880 * @brief Set the Memory to Memory Source address.
1881 * @rmtoll PAR PA LL_DMA_SetM2MSrcAddress
1882 * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
1883 * @note This API must not be called when the DMA stream is enabled.
1884 * @param DMAx DMAx Instance
1885 * @param Stream This parameter can be one of the following values:
1886 * @arg @ref LL_DMA_STREAM_0
1887 * @arg @ref LL_DMA_STREAM_1
1888 * @arg @ref LL_DMA_STREAM_2
1889 * @arg @ref LL_DMA_STREAM_3
1890 * @arg @ref LL_DMA_STREAM_4
1891 * @arg @ref LL_DMA_STREAM_5
1892 * @arg @ref LL_DMA_STREAM_6
1893 * @arg @ref LL_DMA_STREAM_7
1894 * @param MemoryAddress Between 0 to 0xFFFFFFFF
1897 __STATIC_INLINE
void LL_DMA_SetM2MSrcAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t MemoryAddress
)
1899 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1901 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->PAR
, MemoryAddress
);
1905 * @brief Set the Memory to Memory Destination address.
1906 * @rmtoll M0AR M0A LL_DMA_SetM2MDstAddress
1907 * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
1908 * @note This API must not be called when the DMA stream is enabled.
1909 * @param DMAx DMAx Instance
1910 * @param Stream This parameter can be one of the following values:
1911 * @arg @ref LL_DMA_STREAM_0
1912 * @arg @ref LL_DMA_STREAM_1
1913 * @arg @ref LL_DMA_STREAM_2
1914 * @arg @ref LL_DMA_STREAM_3
1915 * @arg @ref LL_DMA_STREAM_4
1916 * @arg @ref LL_DMA_STREAM_5
1917 * @arg @ref LL_DMA_STREAM_6
1918 * @arg @ref LL_DMA_STREAM_7
1919 * @param MemoryAddress Between 0 to 0xFFFFFFFF
1922 __STATIC_INLINE
void LL_DMA_SetM2MDstAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t MemoryAddress
)
1924 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1926 WRITE_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M0AR
, MemoryAddress
);
1930 * @brief Get the Memory to Memory Source address.
1931 * @rmtoll PAR PA LL_DMA_GetM2MSrcAddress
1932 * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
1933 * @param DMAx DMAx Instance
1934 * @param Stream This parameter can be one of the following values:
1935 * @arg @ref LL_DMA_STREAM_0
1936 * @arg @ref LL_DMA_STREAM_1
1937 * @arg @ref LL_DMA_STREAM_2
1938 * @arg @ref LL_DMA_STREAM_3
1939 * @arg @ref LL_DMA_STREAM_4
1940 * @arg @ref LL_DMA_STREAM_5
1941 * @arg @ref LL_DMA_STREAM_6
1942 * @arg @ref LL_DMA_STREAM_7
1943 * @retval Between 0 to 0xFFFFFFFF
1945 __STATIC_INLINE
uint32_t LL_DMA_GetM2MSrcAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1947 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1949 return (READ_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->PAR
));
1953 * @brief Get the Memory to Memory Destination address.
1954 * @rmtoll M0AR M0A LL_DMA_GetM2MDstAddress
1955 * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
1956 * @param DMAx DMAx Instance
1957 * @param Stream This parameter can be one of the following values:
1958 * @arg @ref LL_DMA_STREAM_0
1959 * @arg @ref LL_DMA_STREAM_1
1960 * @arg @ref LL_DMA_STREAM_2
1961 * @arg @ref LL_DMA_STREAM_3
1962 * @arg @ref LL_DMA_STREAM_4
1963 * @arg @ref LL_DMA_STREAM_5
1964 * @arg @ref LL_DMA_STREAM_6
1965 * @arg @ref LL_DMA_STREAM_7
1966 * @retval Between 0 to 0xFFFFFFFF
1968 __STATIC_INLINE
uint32_t LL_DMA_GetM2MDstAddress(DMA_TypeDef
*DMAx
, uint32_t Stream
)
1970 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1972 return (READ_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M0AR
));
1976 * @brief Set Memory 1 address (used in case of Double buffer mode).
1977 * @rmtoll M1AR M1A LL_DMA_SetMemory1Address
1978 * @param DMAx DMAx Instance
1979 * @param Stream This parameter can be one of the following values:
1980 * @arg @ref LL_DMA_STREAM_0
1981 * @arg @ref LL_DMA_STREAM_1
1982 * @arg @ref LL_DMA_STREAM_2
1983 * @arg @ref LL_DMA_STREAM_3
1984 * @arg @ref LL_DMA_STREAM_4
1985 * @arg @ref LL_DMA_STREAM_5
1986 * @arg @ref LL_DMA_STREAM_6
1987 * @arg @ref LL_DMA_STREAM_7
1988 * @param Address Between 0 to 0xFFFFFFFF
1991 __STATIC_INLINE
void LL_DMA_SetMemory1Address(DMA_TypeDef
*DMAx
, uint32_t Stream
, uint32_t Address
)
1993 uint32_t dma_base_addr
= (uint32_t)DMAx
;
1995 MODIFY_REG(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M1AR
, DMA_SxM1AR_M1A
, Address
);
1999 * @brief Get Memory 1 address (used in case of Double buffer mode).
2000 * @rmtoll M1AR M1A LL_DMA_GetMemory1Address
2001 * @param DMAx DMAx Instance
2002 * @param Stream This parameter can be one of the following values:
2003 * @arg @ref LL_DMA_STREAM_0
2004 * @arg @ref LL_DMA_STREAM_1
2005 * @arg @ref LL_DMA_STREAM_2
2006 * @arg @ref LL_DMA_STREAM_3
2007 * @arg @ref LL_DMA_STREAM_4
2008 * @arg @ref LL_DMA_STREAM_5
2009 * @arg @ref LL_DMA_STREAM_6
2010 * @arg @ref LL_DMA_STREAM_7
2011 * @retval Between 0 to 0xFFFFFFFF
2013 __STATIC_INLINE
uint32_t LL_DMA_GetMemory1Address(DMA_TypeDef
*DMAx
, uint32_t Stream
)
2015 uint32_t dma_base_addr
= (uint32_t)DMAx
;
2017 return (((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->M1AR
);
2024 /** @defgroup DMA_LL_EF_FLAG_Management FLAG_Management
2029 * @brief Get Stream 0 half transfer flag.
2030 * @rmtoll LISR HTIF0 LL_DMA_IsActiveFlag_HT0
2031 * @param DMAx DMAx Instance
2032 * @retval State of bit (1 or 0).
2034 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT0(DMA_TypeDef
*DMAx
)
2036 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_HTIF0
) == (DMA_LISR_HTIF0
)) ? 1UL : 0UL);
2040 * @brief Get Stream 1 half transfer flag.
2041 * @rmtoll LISR HTIF1 LL_DMA_IsActiveFlag_HT1
2042 * @param DMAx DMAx Instance
2043 * @retval State of bit (1 or 0).
2045 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT1(DMA_TypeDef
*DMAx
)
2047 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_HTIF1
) == (DMA_LISR_HTIF1
)) ? 1UL : 0UL);
2051 * @brief Get Stream 2 half transfer flag.
2052 * @rmtoll LISR HTIF2 LL_DMA_IsActiveFlag_HT2
2053 * @param DMAx DMAx Instance
2054 * @retval State of bit (1 or 0).
2056 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT2(DMA_TypeDef
*DMAx
)
2058 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_HTIF2
) == (DMA_LISR_HTIF2
)) ? 1UL : 0UL);
2062 * @brief Get Stream 3 half transfer flag.
2063 * @rmtoll LISR HTIF3 LL_DMA_IsActiveFlag_HT3
2064 * @param DMAx DMAx Instance
2065 * @retval State of bit (1 or 0).
2067 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT3(DMA_TypeDef
*DMAx
)
2069 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_HTIF3
) == (DMA_LISR_HTIF3
)) ? 1UL : 0UL);
2073 * @brief Get Stream 4 half transfer flag.
2074 * @rmtoll HISR HTIF4 LL_DMA_IsActiveFlag_HT4
2075 * @param DMAx DMAx Instance
2076 * @retval State of bit (1 or 0).
2078 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT4(DMA_TypeDef
*DMAx
)
2080 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_HTIF4
) == (DMA_HISR_HTIF4
)) ? 1UL : 0UL);
2084 * @brief Get Stream 5 half transfer flag.
2085 * @rmtoll HISR HTIF0 LL_DMA_IsActiveFlag_HT5
2086 * @param DMAx DMAx Instance
2087 * @retval State of bit (1 or 0).
2089 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT5(DMA_TypeDef
*DMAx
)
2091 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_HTIF5
) == (DMA_HISR_HTIF5
)) ? 1UL : 0UL);
2095 * @brief Get Stream 6 half transfer flag.
2096 * @rmtoll HISR HTIF6 LL_DMA_IsActiveFlag_HT6
2097 * @param DMAx DMAx Instance
2098 * @retval State of bit (1 or 0).
2100 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT6(DMA_TypeDef
*DMAx
)
2102 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_HTIF6
) == (DMA_HISR_HTIF6
)) ? 1UL : 0UL);
2106 * @brief Get Stream 7 half transfer flag.
2107 * @rmtoll HISR HTIF7 LL_DMA_IsActiveFlag_HT7
2108 * @param DMAx DMAx Instance
2109 * @retval State of bit (1 or 0).
2111 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_HT7(DMA_TypeDef
*DMAx
)
2113 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_HTIF7
) == (DMA_HISR_HTIF7
)) ? 1UL : 0UL);
2117 * @brief Get Stream 0 transfer complete flag.
2118 * @rmtoll LISR TCIF0 LL_DMA_IsActiveFlag_TC0
2119 * @param DMAx DMAx Instance
2120 * @retval State of bit (1 or 0).
2122 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC0(DMA_TypeDef
*DMAx
)
2124 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TCIF0
) == (DMA_LISR_TCIF0
)) ? 1UL : 0UL);
2128 * @brief Get Stream 1 transfer complete flag.
2129 * @rmtoll LISR TCIF1 LL_DMA_IsActiveFlag_TC1
2130 * @param DMAx DMAx Instance
2131 * @retval State of bit (1 or 0).
2133 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC1(DMA_TypeDef
*DMAx
)
2135 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TCIF1
) == (DMA_LISR_TCIF1
)) ? 1UL : 0UL);
2139 * @brief Get Stream 2 transfer complete flag.
2140 * @rmtoll LISR TCIF2 LL_DMA_IsActiveFlag_TC2
2141 * @param DMAx DMAx Instance
2142 * @retval State of bit (1 or 0).
2144 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC2(DMA_TypeDef
*DMAx
)
2146 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TCIF2
) == (DMA_LISR_TCIF2
)) ? 1UL : 0UL);
2150 * @brief Get Stream 3 transfer complete flag.
2151 * @rmtoll LISR TCIF3 LL_DMA_IsActiveFlag_TC3
2152 * @param DMAx DMAx Instance
2153 * @retval State of bit (1 or 0).
2155 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC3(DMA_TypeDef
*DMAx
)
2157 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TCIF3
) == (DMA_LISR_TCIF3
)) ? 1UL : 0UL);
2161 * @brief Get Stream 4 transfer complete flag.
2162 * @rmtoll HISR TCIF4 LL_DMA_IsActiveFlag_TC4
2163 * @param DMAx DMAx Instance
2164 * @retval State of bit (1 or 0).
2166 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC4(DMA_TypeDef
*DMAx
)
2168 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TCIF4
) == (DMA_HISR_TCIF4
)) ? 1UL : 0UL);
2172 * @brief Get Stream 5 transfer complete flag.
2173 * @rmtoll HISR TCIF0 LL_DMA_IsActiveFlag_TC5
2174 * @param DMAx DMAx Instance
2175 * @retval State of bit (1 or 0).
2177 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC5(DMA_TypeDef
*DMAx
)
2179 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TCIF5
) == (DMA_HISR_TCIF5
)) ? 1UL : 0UL);
2183 * @brief Get Stream 6 transfer complete flag.
2184 * @rmtoll HISR TCIF6 LL_DMA_IsActiveFlag_TC6
2185 * @param DMAx DMAx Instance
2186 * @retval State of bit (1 or 0).
2188 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC6(DMA_TypeDef
*DMAx
)
2190 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TCIF6
) == (DMA_HISR_TCIF6
)) ? 1UL : 0UL);
2194 * @brief Get Stream 7 transfer complete flag.
2195 * @rmtoll HISR TCIF7 LL_DMA_IsActiveFlag_TC7
2196 * @param DMAx DMAx Instance
2197 * @retval State of bit (1 or 0).
2199 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TC7(DMA_TypeDef
*DMAx
)
2201 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TCIF7
) == (DMA_HISR_TCIF7
)) ? 1UL : 0UL);
2205 * @brief Get Stream 0 transfer error flag.
2206 * @rmtoll LISR TEIF0 LL_DMA_IsActiveFlag_TE0
2207 * @param DMAx DMAx Instance
2208 * @retval State of bit (1 or 0).
2210 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE0(DMA_TypeDef
*DMAx
)
2212 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TEIF0
) == (DMA_LISR_TEIF0
)) ? 1UL : 0UL);
2216 * @brief Get Stream 1 transfer error flag.
2217 * @rmtoll LISR TEIF1 LL_DMA_IsActiveFlag_TE1
2218 * @param DMAx DMAx Instance
2219 * @retval State of bit (1 or 0).
2221 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE1(DMA_TypeDef
*DMAx
)
2223 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TEIF1
) == (DMA_LISR_TEIF1
)) ? 1UL : 0UL);
2227 * @brief Get Stream 2 transfer error flag.
2228 * @rmtoll LISR TEIF2 LL_DMA_IsActiveFlag_TE2
2229 * @param DMAx DMAx Instance
2230 * @retval State of bit (1 or 0).
2232 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE2(DMA_TypeDef
*DMAx
)
2234 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TEIF2
) == (DMA_LISR_TEIF2
)) ? 1UL : 0UL);
2238 * @brief Get Stream 3 transfer error flag.
2239 * @rmtoll LISR TEIF3 LL_DMA_IsActiveFlag_TE3
2240 * @param DMAx DMAx Instance
2241 * @retval State of bit (1 or 0).
2243 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE3(DMA_TypeDef
*DMAx
)
2245 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_TEIF3
) == (DMA_LISR_TEIF3
)) ? 1UL : 0UL);
2249 * @brief Get Stream 4 transfer error flag.
2250 * @rmtoll HISR TEIF4 LL_DMA_IsActiveFlag_TE4
2251 * @param DMAx DMAx Instance
2252 * @retval State of bit (1 or 0).
2254 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE4(DMA_TypeDef
*DMAx
)
2256 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TEIF4
) == (DMA_HISR_TEIF4
)) ? 1UL : 0UL);
2260 * @brief Get Stream 5 transfer error flag.
2261 * @rmtoll HISR TEIF0 LL_DMA_IsActiveFlag_TE5
2262 * @param DMAx DMAx Instance
2263 * @retval State of bit (1 or 0).
2265 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE5(DMA_TypeDef
*DMAx
)
2267 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TEIF5
) == (DMA_HISR_TEIF5
)) ? 1UL : 0UL);
2271 * @brief Get Stream 6 transfer error flag.
2272 * @rmtoll HISR TEIF6 LL_DMA_IsActiveFlag_TE6
2273 * @param DMAx DMAx Instance
2274 * @retval State of bit (1 or 0).
2276 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE6(DMA_TypeDef
*DMAx
)
2278 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TEIF6
) == (DMA_HISR_TEIF6
)) ? 1UL : 0UL);
2282 * @brief Get Stream 7 transfer error flag.
2283 * @rmtoll HISR TEIF7 LL_DMA_IsActiveFlag_TE7
2284 * @param DMAx DMAx Instance
2285 * @retval State of bit (1 or 0).
2287 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_TE7(DMA_TypeDef
*DMAx
)
2289 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_TEIF7
) == (DMA_HISR_TEIF7
)) ? 1UL : 0UL);
2293 * @brief Get Stream 0 direct mode error flag.
2294 * @rmtoll LISR DMEIF0 LL_DMA_IsActiveFlag_DME0
2295 * @param DMAx DMAx Instance
2296 * @retval State of bit (1 or 0).
2298 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME0(DMA_TypeDef
*DMAx
)
2300 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_DMEIF0
) == (DMA_LISR_DMEIF0
)) ? 1UL : 0UL);
2304 * @brief Get Stream 1 direct mode error flag.
2305 * @rmtoll LISR DMEIF1 LL_DMA_IsActiveFlag_DME1
2306 * @param DMAx DMAx Instance
2307 * @retval State of bit (1 or 0).
2309 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME1(DMA_TypeDef
*DMAx
)
2311 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_DMEIF1
) == (DMA_LISR_DMEIF1
)) ? 1UL : 0UL);
2315 * @brief Get Stream 2 direct mode error flag.
2316 * @rmtoll LISR DMEIF2 LL_DMA_IsActiveFlag_DME2
2317 * @param DMAx DMAx Instance
2318 * @retval State of bit (1 or 0).
2320 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME2(DMA_TypeDef
*DMAx
)
2322 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_DMEIF2
) == (DMA_LISR_DMEIF2
)) ? 1UL : 0UL);
2326 * @brief Get Stream 3 direct mode error flag.
2327 * @rmtoll LISR DMEIF3 LL_DMA_IsActiveFlag_DME3
2328 * @param DMAx DMAx Instance
2329 * @retval State of bit (1 or 0).
2331 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME3(DMA_TypeDef
*DMAx
)
2333 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_DMEIF3
) == (DMA_LISR_DMEIF3
)) ? 1UL : 0UL);
2337 * @brief Get Stream 4 direct mode error flag.
2338 * @rmtoll HISR DMEIF4 LL_DMA_IsActiveFlag_DME4
2339 * @param DMAx DMAx Instance
2340 * @retval State of bit (1 or 0).
2342 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME4(DMA_TypeDef
*DMAx
)
2344 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_DMEIF4
) == (DMA_HISR_DMEIF4
)) ? 1UL : 0UL);
2348 * @brief Get Stream 5 direct mode error flag.
2349 * @rmtoll HISR DMEIF0 LL_DMA_IsActiveFlag_DME5
2350 * @param DMAx DMAx Instance
2351 * @retval State of bit (1 or 0).
2353 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME5(DMA_TypeDef
*DMAx
)
2355 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_DMEIF5
) == (DMA_HISR_DMEIF5
)) ? 1UL : 0UL);
2359 * @brief Get Stream 6 direct mode error flag.
2360 * @rmtoll HISR DMEIF6 LL_DMA_IsActiveFlag_DME6
2361 * @param DMAx DMAx Instance
2362 * @retval State of bit (1 or 0).
2364 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME6(DMA_TypeDef
*DMAx
)
2366 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_DMEIF6
) == (DMA_HISR_DMEIF6
)) ? 1UL : 0UL);
2370 * @brief Get Stream 7 direct mode error flag.
2371 * @rmtoll HISR DMEIF7 LL_DMA_IsActiveFlag_DME7
2372 * @param DMAx DMAx Instance
2373 * @retval State of bit (1 or 0).
2375 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_DME7(DMA_TypeDef
*DMAx
)
2377 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_DMEIF7
) == (DMA_HISR_DMEIF7
)) ? 1UL : 0UL);
2381 * @brief Get Stream 0 FIFO error flag.
2382 * @rmtoll LISR FEIF0 LL_DMA_IsActiveFlag_FE0
2383 * @param DMAx DMAx Instance
2384 * @retval State of bit (1 or 0).
2386 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE0(DMA_TypeDef
*DMAx
)
2388 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_FEIF0
) == (DMA_LISR_FEIF0
)) ? 1UL : 0UL);
2392 * @brief Get Stream 1 FIFO error flag.
2393 * @rmtoll LISR FEIF1 LL_DMA_IsActiveFlag_FE1
2394 * @param DMAx DMAx Instance
2395 * @retval State of bit (1 or 0).
2397 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE1(DMA_TypeDef
*DMAx
)
2399 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_FEIF1
) == (DMA_LISR_FEIF1
)) ? 1UL : 0UL);
2403 * @brief Get Stream 2 FIFO error flag.
2404 * @rmtoll LISR FEIF2 LL_DMA_IsActiveFlag_FE2
2405 * @param DMAx DMAx Instance
2406 * @retval State of bit (1 or 0).
2408 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE2(DMA_TypeDef
*DMAx
)
2410 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_FEIF2
) == (DMA_LISR_FEIF2
)) ? 1UL : 0UL);
2414 * @brief Get Stream 3 FIFO error flag.
2415 * @rmtoll LISR FEIF3 LL_DMA_IsActiveFlag_FE3
2416 * @param DMAx DMAx Instance
2417 * @retval State of bit (1 or 0).
2419 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE3(DMA_TypeDef
*DMAx
)
2421 return ((READ_BIT(DMAx
->LISR
, DMA_LISR_FEIF3
) == (DMA_LISR_FEIF3
)) ? 1UL : 0UL);
2425 * @brief Get Stream 4 FIFO error flag.
2426 * @rmtoll HISR FEIF4 LL_DMA_IsActiveFlag_FE4
2427 * @param DMAx DMAx Instance
2428 * @retval State of bit (1 or 0).
2430 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE4(DMA_TypeDef
*DMAx
)
2432 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_FEIF4
) == (DMA_HISR_FEIF4
)) ? 1UL : 0UL);
2436 * @brief Get Stream 5 FIFO error flag.
2437 * @rmtoll HISR FEIF0 LL_DMA_IsActiveFlag_FE5
2438 * @param DMAx DMAx Instance
2439 * @retval State of bit (1 or 0).
2441 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE5(DMA_TypeDef
*DMAx
)
2443 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_FEIF5
) == (DMA_HISR_FEIF5
)) ? 1UL : 0UL);
2447 * @brief Get Stream 6 FIFO error flag.
2448 * @rmtoll HISR FEIF6 LL_DMA_IsActiveFlag_FE6
2449 * @param DMAx DMAx Instance
2450 * @retval State of bit (1 or 0).
2452 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE6(DMA_TypeDef
*DMAx
)
2454 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_FEIF6
) == (DMA_HISR_FEIF6
)) ? 1UL : 0UL);
2458 * @brief Get Stream 7 FIFO error flag.
2459 * @rmtoll HISR FEIF7 LL_DMA_IsActiveFlag_FE7
2460 * @param DMAx DMAx Instance
2461 * @retval State of bit (1 or 0).
2463 __STATIC_INLINE
uint32_t LL_DMA_IsActiveFlag_FE7(DMA_TypeDef
*DMAx
)
2465 return ((READ_BIT(DMAx
->HISR
, DMA_HISR_FEIF7
) == (DMA_HISR_FEIF7
)) ? 1UL : 0UL);
2469 * @brief Clear Stream 0 half transfer flag.
2470 * @rmtoll LIFCR CHTIF0 LL_DMA_ClearFlag_HT0
2471 * @param DMAx DMAx Instance
2474 __STATIC_INLINE
void LL_DMA_ClearFlag_HT0(DMA_TypeDef
*DMAx
)
2476 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CHTIF0
);
2480 * @brief Clear Stream 1 half transfer flag.
2481 * @rmtoll LIFCR CHTIF1 LL_DMA_ClearFlag_HT1
2482 * @param DMAx DMAx Instance
2485 __STATIC_INLINE
void LL_DMA_ClearFlag_HT1(DMA_TypeDef
*DMAx
)
2487 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CHTIF1
);
2491 * @brief Clear Stream 2 half transfer flag.
2492 * @rmtoll LIFCR CHTIF2 LL_DMA_ClearFlag_HT2
2493 * @param DMAx DMAx Instance
2496 __STATIC_INLINE
void LL_DMA_ClearFlag_HT2(DMA_TypeDef
*DMAx
)
2498 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CHTIF2
);
2502 * @brief Clear Stream 3 half transfer flag.
2503 * @rmtoll LIFCR CHTIF3 LL_DMA_ClearFlag_HT3
2504 * @param DMAx DMAx Instance
2507 __STATIC_INLINE
void LL_DMA_ClearFlag_HT3(DMA_TypeDef
*DMAx
)
2509 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CHTIF3
);
2513 * @brief Clear Stream 4 half transfer flag.
2514 * @rmtoll HIFCR CHTIF4 LL_DMA_ClearFlag_HT4
2515 * @param DMAx DMAx Instance
2518 __STATIC_INLINE
void LL_DMA_ClearFlag_HT4(DMA_TypeDef
*DMAx
)
2520 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CHTIF4
);
2524 * @brief Clear Stream 5 half transfer flag.
2525 * @rmtoll HIFCR CHTIF5 LL_DMA_ClearFlag_HT5
2526 * @param DMAx DMAx Instance
2529 __STATIC_INLINE
void LL_DMA_ClearFlag_HT5(DMA_TypeDef
*DMAx
)
2531 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CHTIF5
);
2535 * @brief Clear Stream 6 half transfer flag.
2536 * @rmtoll HIFCR CHTIF6 LL_DMA_ClearFlag_HT6
2537 * @param DMAx DMAx Instance
2540 __STATIC_INLINE
void LL_DMA_ClearFlag_HT6(DMA_TypeDef
*DMAx
)
2542 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CHTIF6
);
2546 * @brief Clear Stream 7 half transfer flag.
2547 * @rmtoll HIFCR CHTIF7 LL_DMA_ClearFlag_HT7
2548 * @param DMAx DMAx Instance
2551 __STATIC_INLINE
void LL_DMA_ClearFlag_HT7(DMA_TypeDef
*DMAx
)
2553 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CHTIF7
);
2557 * @brief Clear Stream 0 transfer complete flag.
2558 * @rmtoll LIFCR CTCIF0 LL_DMA_ClearFlag_TC0
2559 * @param DMAx DMAx Instance
2562 __STATIC_INLINE
void LL_DMA_ClearFlag_TC0(DMA_TypeDef
*DMAx
)
2564 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTCIF0
);
2568 * @brief Clear Stream 1 transfer complete flag.
2569 * @rmtoll LIFCR CTCIF1 LL_DMA_ClearFlag_TC1
2570 * @param DMAx DMAx Instance
2573 __STATIC_INLINE
void LL_DMA_ClearFlag_TC1(DMA_TypeDef
*DMAx
)
2575 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTCIF1
);
2579 * @brief Clear Stream 2 transfer complete flag.
2580 * @rmtoll LIFCR CTCIF2 LL_DMA_ClearFlag_TC2
2581 * @param DMAx DMAx Instance
2584 __STATIC_INLINE
void LL_DMA_ClearFlag_TC2(DMA_TypeDef
*DMAx
)
2586 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTCIF2
);
2590 * @brief Clear Stream 3 transfer complete flag.
2591 * @rmtoll LIFCR CTCIF3 LL_DMA_ClearFlag_TC3
2592 * @param DMAx DMAx Instance
2595 __STATIC_INLINE
void LL_DMA_ClearFlag_TC3(DMA_TypeDef
*DMAx
)
2597 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTCIF3
);
2601 * @brief Clear Stream 4 transfer complete flag.
2602 * @rmtoll HIFCR CTCIF4 LL_DMA_ClearFlag_TC4
2603 * @param DMAx DMAx Instance
2606 __STATIC_INLINE
void LL_DMA_ClearFlag_TC4(DMA_TypeDef
*DMAx
)
2608 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTCIF4
);
2612 * @brief Clear Stream 5 transfer complete flag.
2613 * @rmtoll HIFCR CTCIF5 LL_DMA_ClearFlag_TC5
2614 * @param DMAx DMAx Instance
2617 __STATIC_INLINE
void LL_DMA_ClearFlag_TC5(DMA_TypeDef
*DMAx
)
2619 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTCIF5
);
2623 * @brief Clear Stream 6 transfer complete flag.
2624 * @rmtoll HIFCR CTCIF6 LL_DMA_ClearFlag_TC6
2625 * @param DMAx DMAx Instance
2628 __STATIC_INLINE
void LL_DMA_ClearFlag_TC6(DMA_TypeDef
*DMAx
)
2630 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTCIF6
);
2634 * @brief Clear Stream 7 transfer complete flag.
2635 * @rmtoll HIFCR CTCIF7 LL_DMA_ClearFlag_TC7
2636 * @param DMAx DMAx Instance
2639 __STATIC_INLINE
void LL_DMA_ClearFlag_TC7(DMA_TypeDef
*DMAx
)
2641 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTCIF7
);
2645 * @brief Clear Stream 0 transfer error flag.
2646 * @rmtoll LIFCR CTEIF0 LL_DMA_ClearFlag_TE0
2647 * @param DMAx DMAx Instance
2650 __STATIC_INLINE
void LL_DMA_ClearFlag_TE0(DMA_TypeDef
*DMAx
)
2652 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTEIF0
);
2656 * @brief Clear Stream 1 transfer error flag.
2657 * @rmtoll LIFCR CTEIF1 LL_DMA_ClearFlag_TE1
2658 * @param DMAx DMAx Instance
2661 __STATIC_INLINE
void LL_DMA_ClearFlag_TE1(DMA_TypeDef
*DMAx
)
2663 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTEIF1
);
2667 * @brief Clear Stream 2 transfer error flag.
2668 * @rmtoll LIFCR CTEIF2 LL_DMA_ClearFlag_TE2
2669 * @param DMAx DMAx Instance
2672 __STATIC_INLINE
void LL_DMA_ClearFlag_TE2(DMA_TypeDef
*DMAx
)
2674 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTEIF2
);
2678 * @brief Clear Stream 3 transfer error flag.
2679 * @rmtoll LIFCR CTEIF3 LL_DMA_ClearFlag_TE3
2680 * @param DMAx DMAx Instance
2683 __STATIC_INLINE
void LL_DMA_ClearFlag_TE3(DMA_TypeDef
*DMAx
)
2685 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CTEIF3
);
2689 * @brief Clear Stream 4 transfer error flag.
2690 * @rmtoll HIFCR CTEIF4 LL_DMA_ClearFlag_TE4
2691 * @param DMAx DMAx Instance
2694 __STATIC_INLINE
void LL_DMA_ClearFlag_TE4(DMA_TypeDef
*DMAx
)
2696 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTEIF4
);
2700 * @brief Clear Stream 5 transfer error flag.
2701 * @rmtoll HIFCR CTEIF5 LL_DMA_ClearFlag_TE5
2702 * @param DMAx DMAx Instance
2705 __STATIC_INLINE
void LL_DMA_ClearFlag_TE5(DMA_TypeDef
*DMAx
)
2707 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTEIF5
);
2711 * @brief Clear Stream 6 transfer error flag.
2712 * @rmtoll HIFCR CTEIF6 LL_DMA_ClearFlag_TE6
2713 * @param DMAx DMAx Instance
2716 __STATIC_INLINE
void LL_DMA_ClearFlag_TE6(DMA_TypeDef
*DMAx
)
2718 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTEIF6
);
2722 * @brief Clear Stream 7 transfer error flag.
2723 * @rmtoll HIFCR CTEIF7 LL_DMA_ClearFlag_TE7
2724 * @param DMAx DMAx Instance
2727 __STATIC_INLINE
void LL_DMA_ClearFlag_TE7(DMA_TypeDef
*DMAx
)
2729 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CTEIF7
);
2733 * @brief Clear Stream 0 direct mode error flag.
2734 * @rmtoll LIFCR CDMEIF0 LL_DMA_ClearFlag_DME0
2735 * @param DMAx DMAx Instance
2738 __STATIC_INLINE
void LL_DMA_ClearFlag_DME0(DMA_TypeDef
*DMAx
)
2740 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CDMEIF0
);
2744 * @brief Clear Stream 1 direct mode error flag.
2745 * @rmtoll LIFCR CDMEIF1 LL_DMA_ClearFlag_DME1
2746 * @param DMAx DMAx Instance
2749 __STATIC_INLINE
void LL_DMA_ClearFlag_DME1(DMA_TypeDef
*DMAx
)
2751 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CDMEIF1
);
2755 * @brief Clear Stream 2 direct mode error flag.
2756 * @rmtoll LIFCR CDMEIF2 LL_DMA_ClearFlag_DME2
2757 * @param DMAx DMAx Instance
2760 __STATIC_INLINE
void LL_DMA_ClearFlag_DME2(DMA_TypeDef
*DMAx
)
2762 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CDMEIF2
);
2766 * @brief Clear Stream 3 direct mode error flag.
2767 * @rmtoll LIFCR CDMEIF3 LL_DMA_ClearFlag_DME3
2768 * @param DMAx DMAx Instance
2771 __STATIC_INLINE
void LL_DMA_ClearFlag_DME3(DMA_TypeDef
*DMAx
)
2773 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CDMEIF3
);
2777 * @brief Clear Stream 4 direct mode error flag.
2778 * @rmtoll HIFCR CDMEIF4 LL_DMA_ClearFlag_DME4
2779 * @param DMAx DMAx Instance
2782 __STATIC_INLINE
void LL_DMA_ClearFlag_DME4(DMA_TypeDef
*DMAx
)
2784 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CDMEIF4
);
2788 * @brief Clear Stream 5 direct mode error flag.
2789 * @rmtoll HIFCR CDMEIF5 LL_DMA_ClearFlag_DME5
2790 * @param DMAx DMAx Instance
2793 __STATIC_INLINE
void LL_DMA_ClearFlag_DME5(DMA_TypeDef
*DMAx
)
2795 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CDMEIF5
);
2799 * @brief Clear Stream 6 direct mode error flag.
2800 * @rmtoll HIFCR CDMEIF6 LL_DMA_ClearFlag_DME6
2801 * @param DMAx DMAx Instance
2804 __STATIC_INLINE
void LL_DMA_ClearFlag_DME6(DMA_TypeDef
*DMAx
)
2806 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CDMEIF6
);
2810 * @brief Clear Stream 7 direct mode error flag.
2811 * @rmtoll HIFCR CDMEIF7 LL_DMA_ClearFlag_DME7
2812 * @param DMAx DMAx Instance
2815 __STATIC_INLINE
void LL_DMA_ClearFlag_DME7(DMA_TypeDef
*DMAx
)
2817 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CDMEIF7
);
2821 * @brief Clear Stream 0 FIFO error flag.
2822 * @rmtoll LIFCR CFEIF0 LL_DMA_ClearFlag_FE0
2823 * @param DMAx DMAx Instance
2826 __STATIC_INLINE
void LL_DMA_ClearFlag_FE0(DMA_TypeDef
*DMAx
)
2828 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CFEIF0
);
2832 * @brief Clear Stream 1 FIFO error flag.
2833 * @rmtoll LIFCR CFEIF1 LL_DMA_ClearFlag_FE1
2834 * @param DMAx DMAx Instance
2837 __STATIC_INLINE
void LL_DMA_ClearFlag_FE1(DMA_TypeDef
*DMAx
)
2839 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CFEIF1
);
2843 * @brief Clear Stream 2 FIFO error flag.
2844 * @rmtoll LIFCR CFEIF2 LL_DMA_ClearFlag_FE2
2845 * @param DMAx DMAx Instance
2848 __STATIC_INLINE
void LL_DMA_ClearFlag_FE2(DMA_TypeDef
*DMAx
)
2850 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CFEIF2
);
2854 * @brief Clear Stream 3 FIFO error flag.
2855 * @rmtoll LIFCR CFEIF3 LL_DMA_ClearFlag_FE3
2856 * @param DMAx DMAx Instance
2859 __STATIC_INLINE
void LL_DMA_ClearFlag_FE3(DMA_TypeDef
*DMAx
)
2861 WRITE_REG(DMAx
->LIFCR
, DMA_LIFCR_CFEIF3
);
2865 * @brief Clear Stream 4 FIFO error flag.
2866 * @rmtoll HIFCR CFEIF4 LL_DMA_ClearFlag_FE4
2867 * @param DMAx DMAx Instance
2870 __STATIC_INLINE
void LL_DMA_ClearFlag_FE4(DMA_TypeDef
*DMAx
)
2872 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CFEIF4
);
2876 * @brief Clear Stream 5 FIFO error flag.
2877 * @rmtoll HIFCR CFEIF5 LL_DMA_ClearFlag_FE5
2878 * @param DMAx DMAx Instance
2881 __STATIC_INLINE
void LL_DMA_ClearFlag_FE5(DMA_TypeDef
*DMAx
)
2883 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CFEIF5
);
2887 * @brief Clear Stream 6 FIFO error flag.
2888 * @rmtoll HIFCR CFEIF6 LL_DMA_ClearFlag_FE6
2889 * @param DMAx DMAx Instance
2892 __STATIC_INLINE
void LL_DMA_ClearFlag_FE6(DMA_TypeDef
*DMAx
)
2894 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CFEIF6
);
2898 * @brief Clear Stream 7 FIFO error flag.
2899 * @rmtoll HIFCR CFEIF7 LL_DMA_ClearFlag_FE7
2900 * @param DMAx DMAx Instance
2903 __STATIC_INLINE
void LL_DMA_ClearFlag_FE7(DMA_TypeDef
*DMAx
)
2905 WRITE_REG(DMAx
->HIFCR
, DMA_HIFCR_CFEIF7
);
2912 /** @defgroup DMA_LL_EF_IT_Management IT_Management
2917 * @brief Enable Half transfer interrupt.
2918 * @rmtoll CR HTIE LL_DMA_EnableIT_HT
2919 * @param DMAx DMAx Instance
2920 * @param Stream This parameter can be one of the following values:
2921 * @arg @ref LL_DMA_STREAM_0
2922 * @arg @ref LL_DMA_STREAM_1
2923 * @arg @ref LL_DMA_STREAM_2
2924 * @arg @ref LL_DMA_STREAM_3
2925 * @arg @ref LL_DMA_STREAM_4
2926 * @arg @ref LL_DMA_STREAM_5
2927 * @arg @ref LL_DMA_STREAM_6
2928 * @arg @ref LL_DMA_STREAM_7
2931 __STATIC_INLINE
void LL_DMA_EnableIT_HT(DMA_TypeDef
*DMAx
, uint32_t Stream
)
2933 uint32_t dma_base_addr
= (uint32_t)DMAx
;
2935 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_HTIE
);
2939 * @brief Enable Transfer error interrupt.
2940 * @rmtoll CR TEIE LL_DMA_EnableIT_TE
2941 * @param DMAx DMAx Instance
2942 * @param Stream This parameter can be one of the following values:
2943 * @arg @ref LL_DMA_STREAM_0
2944 * @arg @ref LL_DMA_STREAM_1
2945 * @arg @ref LL_DMA_STREAM_2
2946 * @arg @ref LL_DMA_STREAM_3
2947 * @arg @ref LL_DMA_STREAM_4
2948 * @arg @ref LL_DMA_STREAM_5
2949 * @arg @ref LL_DMA_STREAM_6
2950 * @arg @ref LL_DMA_STREAM_7
2953 __STATIC_INLINE
void LL_DMA_EnableIT_TE(DMA_TypeDef
*DMAx
, uint32_t Stream
)
2955 uint32_t dma_base_addr
= (uint32_t)DMAx
;
2957 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TEIE
);
2961 * @brief Enable Transfer complete interrupt.
2962 * @rmtoll CR TCIE LL_DMA_EnableIT_TC
2963 * @param DMAx DMAx Instance
2964 * @param Stream This parameter can be one of the following values:
2965 * @arg @ref LL_DMA_STREAM_0
2966 * @arg @ref LL_DMA_STREAM_1
2967 * @arg @ref LL_DMA_STREAM_2
2968 * @arg @ref LL_DMA_STREAM_3
2969 * @arg @ref LL_DMA_STREAM_4
2970 * @arg @ref LL_DMA_STREAM_5
2971 * @arg @ref LL_DMA_STREAM_6
2972 * @arg @ref LL_DMA_STREAM_7
2975 __STATIC_INLINE
void LL_DMA_EnableIT_TC(DMA_TypeDef
*DMAx
, uint32_t Stream
)
2977 uint32_t dma_base_addr
= (uint32_t)DMAx
;
2979 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TCIE
);
2983 * @brief Enable Direct mode error interrupt.
2984 * @rmtoll CR DMEIE LL_DMA_EnableIT_DME
2985 * @param DMAx DMAx Instance
2986 * @param Stream This parameter can be one of the following values:
2987 * @arg @ref LL_DMA_STREAM_0
2988 * @arg @ref LL_DMA_STREAM_1
2989 * @arg @ref LL_DMA_STREAM_2
2990 * @arg @ref LL_DMA_STREAM_3
2991 * @arg @ref LL_DMA_STREAM_4
2992 * @arg @ref LL_DMA_STREAM_5
2993 * @arg @ref LL_DMA_STREAM_6
2994 * @arg @ref LL_DMA_STREAM_7
2997 __STATIC_INLINE
void LL_DMA_EnableIT_DME(DMA_TypeDef
*DMAx
, uint32_t Stream
)
2999 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3001 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_DMEIE
);
3005 * @brief Enable FIFO error interrupt.
3006 * @rmtoll FCR FEIE LL_DMA_EnableIT_FE
3007 * @param DMAx DMAx Instance
3008 * @param Stream This parameter can be one of the following values:
3009 * @arg @ref LL_DMA_STREAM_0
3010 * @arg @ref LL_DMA_STREAM_1
3011 * @arg @ref LL_DMA_STREAM_2
3012 * @arg @ref LL_DMA_STREAM_3
3013 * @arg @ref LL_DMA_STREAM_4
3014 * @arg @ref LL_DMA_STREAM_5
3015 * @arg @ref LL_DMA_STREAM_6
3016 * @arg @ref LL_DMA_STREAM_7
3019 __STATIC_INLINE
void LL_DMA_EnableIT_FE(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3021 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3023 SET_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_FEIE
);
3027 * @brief Disable Half transfer interrupt.
3028 * @rmtoll CR HTIE LL_DMA_DisableIT_HT
3029 * @param DMAx DMAx Instance
3030 * @param Stream This parameter can be one of the following values:
3031 * @arg @ref LL_DMA_STREAM_0
3032 * @arg @ref LL_DMA_STREAM_1
3033 * @arg @ref LL_DMA_STREAM_2
3034 * @arg @ref LL_DMA_STREAM_3
3035 * @arg @ref LL_DMA_STREAM_4
3036 * @arg @ref LL_DMA_STREAM_5
3037 * @arg @ref LL_DMA_STREAM_6
3038 * @arg @ref LL_DMA_STREAM_7
3041 __STATIC_INLINE
void LL_DMA_DisableIT_HT(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3043 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3045 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_HTIE
);
3049 * @brief Disable Transfer error interrupt.
3050 * @rmtoll CR TEIE LL_DMA_DisableIT_TE
3051 * @param DMAx DMAx Instance
3052 * @param Stream This parameter can be one of the following values:
3053 * @arg @ref LL_DMA_STREAM_0
3054 * @arg @ref LL_DMA_STREAM_1
3055 * @arg @ref LL_DMA_STREAM_2
3056 * @arg @ref LL_DMA_STREAM_3
3057 * @arg @ref LL_DMA_STREAM_4
3058 * @arg @ref LL_DMA_STREAM_5
3059 * @arg @ref LL_DMA_STREAM_6
3060 * @arg @ref LL_DMA_STREAM_7
3063 __STATIC_INLINE
void LL_DMA_DisableIT_TE(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3065 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3067 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TEIE
);
3071 * @brief Disable Transfer complete interrupt.
3072 * @rmtoll CR TCIE LL_DMA_DisableIT_TC
3073 * @param DMAx DMAx Instance
3074 * @param Stream This parameter can be one of the following values:
3075 * @arg @ref LL_DMA_STREAM_0
3076 * @arg @ref LL_DMA_STREAM_1
3077 * @arg @ref LL_DMA_STREAM_2
3078 * @arg @ref LL_DMA_STREAM_3
3079 * @arg @ref LL_DMA_STREAM_4
3080 * @arg @ref LL_DMA_STREAM_5
3081 * @arg @ref LL_DMA_STREAM_6
3082 * @arg @ref LL_DMA_STREAM_7
3085 __STATIC_INLINE
void LL_DMA_DisableIT_TC(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3087 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3089 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TCIE
);
3093 * @brief Disable Direct mode error interrupt.
3094 * @rmtoll CR DMEIE LL_DMA_DisableIT_DME
3095 * @param DMAx DMAx Instance
3096 * @param Stream This parameter can be one of the following values:
3097 * @arg @ref LL_DMA_STREAM_0
3098 * @arg @ref LL_DMA_STREAM_1
3099 * @arg @ref LL_DMA_STREAM_2
3100 * @arg @ref LL_DMA_STREAM_3
3101 * @arg @ref LL_DMA_STREAM_4
3102 * @arg @ref LL_DMA_STREAM_5
3103 * @arg @ref LL_DMA_STREAM_6
3104 * @arg @ref LL_DMA_STREAM_7
3107 __STATIC_INLINE
void LL_DMA_DisableIT_DME(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3109 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3111 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_DMEIE
);
3115 * @brief Disable FIFO error interrupt.
3116 * @rmtoll FCR FEIE LL_DMA_DisableIT_FE
3117 * @param DMAx DMAx Instance
3118 * @param Stream This parameter can be one of the following values:
3119 * @arg @ref LL_DMA_STREAM_0
3120 * @arg @ref LL_DMA_STREAM_1
3121 * @arg @ref LL_DMA_STREAM_2
3122 * @arg @ref LL_DMA_STREAM_3
3123 * @arg @ref LL_DMA_STREAM_4
3124 * @arg @ref LL_DMA_STREAM_5
3125 * @arg @ref LL_DMA_STREAM_6
3126 * @arg @ref LL_DMA_STREAM_7
3129 __STATIC_INLINE
void LL_DMA_DisableIT_FE(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3131 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3133 CLEAR_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_FEIE
);
3137 * @brief Check if Half transfer interrup is enabled.
3138 * @rmtoll CR HTIE LL_DMA_IsEnabledIT_HT
3139 * @param DMAx DMAx Instance
3140 * @param Stream This parameter can be one of the following values:
3141 * @arg @ref LL_DMA_STREAM_0
3142 * @arg @ref LL_DMA_STREAM_1
3143 * @arg @ref LL_DMA_STREAM_2
3144 * @arg @ref LL_DMA_STREAM_3
3145 * @arg @ref LL_DMA_STREAM_4
3146 * @arg @ref LL_DMA_STREAM_5
3147 * @arg @ref LL_DMA_STREAM_6
3148 * @arg @ref LL_DMA_STREAM_7
3149 * @retval State of bit (1 or 0).
3151 __STATIC_INLINE
uint32_t LL_DMA_IsEnabledIT_HT(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3153 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3155 return ((READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_HTIE
) == DMA_SxCR_HTIE
) ? 1UL : 0UL);
3159 * @brief Check if Transfer error nterrup is enabled.
3160 * @rmtoll CR TEIE LL_DMA_IsEnabledIT_TE
3161 * @param DMAx DMAx Instance
3162 * @param Stream This parameter can be one of the following values:
3163 * @arg @ref LL_DMA_STREAM_0
3164 * @arg @ref LL_DMA_STREAM_1
3165 * @arg @ref LL_DMA_STREAM_2
3166 * @arg @ref LL_DMA_STREAM_3
3167 * @arg @ref LL_DMA_STREAM_4
3168 * @arg @ref LL_DMA_STREAM_5
3169 * @arg @ref LL_DMA_STREAM_6
3170 * @arg @ref LL_DMA_STREAM_7
3171 * @retval State of bit (1 or 0).
3173 __STATIC_INLINE
uint32_t LL_DMA_IsEnabledIT_TE(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3175 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3177 return ((READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TEIE
) == DMA_SxCR_TEIE
) ? 1UL : 0UL);
3181 * @brief Check if Transfer complete interrup is enabled.
3182 * @rmtoll CR TCIE LL_DMA_IsEnabledIT_TC
3183 * @param DMAx DMAx Instance
3184 * @param Stream This parameter can be one of the following values:
3185 * @arg @ref LL_DMA_STREAM_0
3186 * @arg @ref LL_DMA_STREAM_1
3187 * @arg @ref LL_DMA_STREAM_2
3188 * @arg @ref LL_DMA_STREAM_3
3189 * @arg @ref LL_DMA_STREAM_4
3190 * @arg @ref LL_DMA_STREAM_5
3191 * @arg @ref LL_DMA_STREAM_6
3192 * @arg @ref LL_DMA_STREAM_7
3193 * @retval State of bit (1 or 0).
3195 __STATIC_INLINE
uint32_t LL_DMA_IsEnabledIT_TC(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3197 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3199 return ((READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_TCIE
) == DMA_SxCR_TCIE
) ? 1UL : 0UL);
3203 * @brief Check if Direct mode error interrupt is enabled.
3204 * @rmtoll CR DMEIE LL_DMA_IsEnabledIT_DME
3205 * @param DMAx DMAx Instance
3206 * @param Stream This parameter can be one of the following values:
3207 * @arg @ref LL_DMA_STREAM_0
3208 * @arg @ref LL_DMA_STREAM_1
3209 * @arg @ref LL_DMA_STREAM_2
3210 * @arg @ref LL_DMA_STREAM_3
3211 * @arg @ref LL_DMA_STREAM_4
3212 * @arg @ref LL_DMA_STREAM_5
3213 * @arg @ref LL_DMA_STREAM_6
3214 * @arg @ref LL_DMA_STREAM_7
3215 * @retval State of bit (1 or 0).
3217 __STATIC_INLINE
uint32_t LL_DMA_IsEnabledIT_DME(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3219 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3221 return ((READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->CR
, DMA_SxCR_DMEIE
) == DMA_SxCR_DMEIE
) ? 1UL : 0UL);
3225 * @brief Check if FIFO error interrup is enabled.
3226 * @rmtoll FCR FEIE LL_DMA_IsEnabledIT_FE
3227 * @param DMAx DMAx Instance
3228 * @param Stream This parameter can be one of the following values:
3229 * @arg @ref LL_DMA_STREAM_0
3230 * @arg @ref LL_DMA_STREAM_1
3231 * @arg @ref LL_DMA_STREAM_2
3232 * @arg @ref LL_DMA_STREAM_3
3233 * @arg @ref LL_DMA_STREAM_4
3234 * @arg @ref LL_DMA_STREAM_5
3235 * @arg @ref LL_DMA_STREAM_6
3236 * @arg @ref LL_DMA_STREAM_7
3237 * @retval State of bit (1 or 0).
3239 __STATIC_INLINE
uint32_t LL_DMA_IsEnabledIT_FE(DMA_TypeDef
*DMAx
, uint32_t Stream
)
3241 uint32_t dma_base_addr
= (uint32_t)DMAx
;
3243 return ((READ_BIT(((DMA_Stream_TypeDef
*)(dma_base_addr
+ LL_DMA_STR_OFFSET_TAB
[Stream
]))->FCR
, DMA_SxFCR_FEIE
) == DMA_SxFCR_FEIE
) ? 1UL : 0UL);
3250 #if defined(USE_FULL_LL_DRIVER)
3251 /** @defgroup DMA_LL_EF_Init Initialization and de-initialization functions
3255 uint32_t LL_DMA_Init(DMA_TypeDef
*DMAx
, uint32_t Stream
, LL_DMA_InitTypeDef
*DMA_InitStruct
);
3256 uint32_t LL_DMA_DeInit(DMA_TypeDef
*DMAx
, uint32_t Stream
);
3257 void LL_DMA_StructInit(LL_DMA_InitTypeDef
*DMA_InitStruct
);
3262 #endif /* USE_FULL_LL_DRIVER */
3272 #endif /* DMA1 || DMA2 */
3282 #endif /* __STM32H7xx_LL_DMA_H */
3284 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/