You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

465 lines
20 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32f7xx_ll_dma.c
  4. * @author MCD Application Team
  5. * @version V1.2.2
  6. * @date 14-April-2017
  7. * @brief DMA LL module driver.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  12. *
  13. * Redistribution and use in source and binary forms, with or without modification,
  14. * are permitted provided that the following conditions are met:
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. * 2. Redistributions in binary form must reproduce the above copyright notice,
  18. * this list of conditions and the following disclaimer in the documentation
  19. * and/or other materials provided with the distribution.
  20. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  21. * may be used to endorse or promote products derived from this software
  22. * without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  25. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  27. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  28. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  30. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  31. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  32. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  33. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. *
  35. ******************************************************************************
  36. */
  37. #if defined(USE_FULL_LL_DRIVER)
  38. /* Includes ------------------------------------------------------------------*/
  39. #include "stm32f7xx_ll_dma.h"
  40. #include "stm32f7xx_ll_bus.h"
  41. #ifdef USE_FULL_ASSERT
  42. #include "stm32_assert.h"
  43. #else
  44. #define assert_param(expr) ((void)0U)
  45. #endif
  46. /** @addtogroup STM32F7xx_LL_Driver
  47. * @{
  48. */
  49. #if defined (DMA1) || defined (DMA2)
  50. /** @defgroup DMA_LL DMA
  51. * @{
  52. */
  53. /* Private types -------------------------------------------------------------*/
  54. /* Private variables ---------------------------------------------------------*/
  55. /* Private constants ---------------------------------------------------------*/
  56. /* Private macros ------------------------------------------------------------*/
  57. /** @addtogroup DMA_LL_Private_Macros
  58. * @{
  59. */
  60. #define IS_LL_DMA_DIRECTION(__VALUE__) (((__VALUE__) == LL_DMA_DIRECTION_PERIPH_TO_MEMORY) || \
  61. ((__VALUE__) == LL_DMA_DIRECTION_MEMORY_TO_PERIPH) || \
  62. ((__VALUE__) == LL_DMA_DIRECTION_MEMORY_TO_MEMORY))
  63. #define IS_LL_DMA_MODE(__VALUE__) (((__VALUE__) == LL_DMA_MODE_NORMAL) || \
  64. ((__VALUE__) == LL_DMA_MODE_CIRCULAR) || \
  65. ((__VALUE__) == LL_DMA_MODE_PFCTRL))
  66. #define IS_LL_DMA_PERIPHINCMODE(__VALUE__) (((__VALUE__) == LL_DMA_PERIPH_INCREMENT) || \
  67. ((__VALUE__) == LL_DMA_PERIPH_NOINCREMENT))
  68. #define IS_LL_DMA_MEMORYINCMODE(__VALUE__) (((__VALUE__) == LL_DMA_MEMORY_INCREMENT) || \
  69. ((__VALUE__) == LL_DMA_MEMORY_NOINCREMENT))
  70. #define IS_LL_DMA_PERIPHDATASIZE(__VALUE__) (((__VALUE__) == LL_DMA_PDATAALIGN_BYTE) || \
  71. ((__VALUE__) == LL_DMA_PDATAALIGN_HALFWORD) || \
  72. ((__VALUE__) == LL_DMA_PDATAALIGN_WORD))
  73. #define IS_LL_DMA_MEMORYDATASIZE(__VALUE__) (((__VALUE__) == LL_DMA_MDATAALIGN_BYTE) || \
  74. ((__VALUE__) == LL_DMA_MDATAALIGN_HALFWORD) || \
  75. ((__VALUE__) == LL_DMA_MDATAALIGN_WORD))
  76. #define IS_LL_DMA_NBDATA(__VALUE__) ((__VALUE__) <= 0x0000FFFFU)
  77. #if defined(DMA_CHANNEL_SELECTION_8_15)
  78. #define IS_LL_DMA_CHANNEL(__VALUE__) (((__VALUE__) == LL_DMA_CHANNEL_0) || \
  79. ((__VALUE__) == LL_DMA_CHANNEL_1) || \
  80. ((__VALUE__) == LL_DMA_CHANNEL_2) || \
  81. ((__VALUE__) == LL_DMA_CHANNEL_3) || \
  82. ((__VALUE__) == LL_DMA_CHANNEL_4) || \
  83. ((__VALUE__) == LL_DMA_CHANNEL_5) || \
  84. ((__VALUE__) == LL_DMA_CHANNEL_6) || \
  85. ((__VALUE__) == LL_DMA_CHANNEL_7) || \
  86. ((__VALUE__) == LL_DMA_CHANNEL_8) || \
  87. ((__VALUE__) == LL_DMA_CHANNEL_9) || \
  88. ((__VALUE__) == LL_DMA_CHANNEL_10) || \
  89. ((__VALUE__) == LL_DMA_CHANNEL_11) || \
  90. ((__VALUE__) == LL_DMA_CHANNEL_12) || \
  91. ((__VALUE__) == LL_DMA_CHANNEL_13) || \
  92. ((__VALUE__) == LL_DMA_CHANNEL_14) || \
  93. ((__VALUE__) == LL_DMA_CHANNEL_15))
  94. #else
  95. #define IS_LL_DMA_CHANNEL(__VALUE__) (((__VALUE__) == LL_DMA_CHANNEL_0) || \
  96. ((__VALUE__) == LL_DMA_CHANNEL_1) || \
  97. ((__VALUE__) == LL_DMA_CHANNEL_2) || \
  98. ((__VALUE__) == LL_DMA_CHANNEL_3) || \
  99. ((__VALUE__) == LL_DMA_CHANNEL_4) || \
  100. ((__VALUE__) == LL_DMA_CHANNEL_5) || \
  101. ((__VALUE__) == LL_DMA_CHANNEL_6) || \
  102. ((__VALUE__) == LL_DMA_CHANNEL_7))
  103. #endif /* DMA_CHANNEL_SELECTION_8_15 */
  104. #define IS_LL_DMA_PRIORITY(__VALUE__) (((__VALUE__) == LL_DMA_PRIORITY_LOW) || \
  105. ((__VALUE__) == LL_DMA_PRIORITY_MEDIUM) || \
  106. ((__VALUE__) == LL_DMA_PRIORITY_HIGH) || \
  107. ((__VALUE__) == LL_DMA_PRIORITY_VERYHIGH))
  108. #define IS_LL_DMA_ALL_STREAM_INSTANCE(INSTANCE, STREAM) ((((INSTANCE) == DMA1) && \
  109. (((STREAM) == LL_DMA_STREAM_0) || \
  110. ((STREAM) == LL_DMA_STREAM_1) || \
  111. ((STREAM) == LL_DMA_STREAM_2) || \
  112. ((STREAM) == LL_DMA_STREAM_3) || \
  113. ((STREAM) == LL_DMA_STREAM_4) || \
  114. ((STREAM) == LL_DMA_STREAM_5) || \
  115. ((STREAM) == LL_DMA_STREAM_6) || \
  116. ((STREAM) == LL_DMA_STREAM_7) || \
  117. ((STREAM) == LL_DMA_STREAM_ALL))) ||\
  118. (((INSTANCE) == DMA2) && \
  119. (((STREAM) == LL_DMA_STREAM_0) || \
  120. ((STREAM) == LL_DMA_STREAM_1) || \
  121. ((STREAM) == LL_DMA_STREAM_2) || \
  122. ((STREAM) == LL_DMA_STREAM_3) || \
  123. ((STREAM) == LL_DMA_STREAM_4) || \
  124. ((STREAM) == LL_DMA_STREAM_5) || \
  125. ((STREAM) == LL_DMA_STREAM_6) || \
  126. ((STREAM) == LL_DMA_STREAM_7) || \
  127. ((STREAM) == LL_DMA_STREAM_ALL))))
  128. #define IS_LL_DMA_FIFO_MODE_STATE(STATE) (((STATE) == LL_DMA_FIFOMODE_DISABLE ) || \
  129. ((STATE) == LL_DMA_FIFOMODE_ENABLE))
  130. #define IS_LL_DMA_FIFO_THRESHOLD(THRESHOLD) (((THRESHOLD) == LL_DMA_FIFOTHRESHOLD_1_4) || \
  131. ((THRESHOLD) == LL_DMA_FIFOTHRESHOLD_1_2) || \
  132. ((THRESHOLD) == LL_DMA_FIFOTHRESHOLD_3_4) || \
  133. ((THRESHOLD) == LL_DMA_FIFOTHRESHOLD_FULL))
  134. #define IS_LL_DMA_MEMORY_BURST(BURST) (((BURST) == LL_DMA_MBURST_SINGLE) || \
  135. ((BURST) == LL_DMA_MBURST_INC4) || \
  136. ((BURST) == LL_DMA_MBURST_INC8) || \
  137. ((BURST) == LL_DMA_MBURST_INC16))
  138. #define IS_LL_DMA_PERIPHERAL_BURST(BURST) (((BURST) == LL_DMA_PBURST_SINGLE) || \
  139. ((BURST) == LL_DMA_PBURST_INC4) || \
  140. ((BURST) == LL_DMA_PBURST_INC8) || \
  141. ((BURST) == LL_DMA_PBURST_INC16))
  142. /**
  143. * @}
  144. */
  145. /* Private function prototypes -----------------------------------------------*/
  146. /* Exported functions --------------------------------------------------------*/
  147. /** @addtogroup DMA_LL_Exported_Functions
  148. * @{
  149. */
  150. /** @addtogroup DMA_LL_EF_Init
  151. * @{
  152. */
  153. /**
  154. * @brief De-initialize the DMA registers to their default reset values.
  155. * @param DMAx DMAx Instance
  156. * @param Stream This parameter can be one of the following values:
  157. * @arg @ref LL_DMA_STREAM_0
  158. * @arg @ref LL_DMA_STREAM_1
  159. * @arg @ref LL_DMA_STREAM_2
  160. * @arg @ref LL_DMA_STREAM_3
  161. * @arg @ref LL_DMA_STREAM_4
  162. * @arg @ref LL_DMA_STREAM_5
  163. * @arg @ref LL_DMA_STREAM_6
  164. * @arg @ref LL_DMA_STREAM_7
  165. * @arg @ref LL_DMA_STREAM_ALL
  166. * @retval An ErrorStatus enumeration value:
  167. * - SUCCESS: DMA registers are de-initialized
  168. * - ERROR: DMA registers are not de-initialized
  169. */
  170. uint32_t LL_DMA_DeInit(DMA_TypeDef *DMAx, uint32_t Stream)
  171. {
  172. DMA_Stream_TypeDef *tmp = (DMA_Stream_TypeDef *)DMA1_Stream0;
  173. ErrorStatus status = SUCCESS;
  174. /* Check the DMA Instance DMAx and Stream parameters*/
  175. assert_param(IS_LL_DMA_ALL_STREAM_INSTANCE(DMAx, Stream));
  176. if (Stream == LL_DMA_STREAM_ALL)
  177. {
  178. if (DMAx == DMA1)
  179. {
  180. /* Force reset of DMA clock */
  181. LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_DMA1);
  182. /* Release reset of DMA clock */
  183. LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_DMA1);
  184. }
  185. else if (DMAx == DMA2)
  186. {
  187. /* Force reset of DMA clock */
  188. LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_DMA2);
  189. /* Release reset of DMA clock */
  190. LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_DMA2);
  191. }
  192. else
  193. {
  194. status = ERROR;
  195. }
  196. }
  197. else
  198. {
  199. /* Disable the selected Stream */
  200. LL_DMA_DisableStream(DMAx,Stream);
  201. /* Get the DMA Stream Instance */
  202. tmp = (DMA_Stream_TypeDef *)(__LL_DMA_GET_STREAM_INSTANCE(DMAx, Stream));
  203. /* Reset DMAx_Streamy configuration register */
  204. LL_DMA_WriteReg(tmp, CR, 0U);
  205. /* Reset DMAx_Streamy remaining bytes register */
  206. LL_DMA_WriteReg(tmp, NDTR, 0U);
  207. /* Reset DMAx_Streamy peripheral address register */
  208. LL_DMA_WriteReg(tmp, PAR, 0U);
  209. /* Reset DMAx_Streamy memory address register */
  210. LL_DMA_WriteReg(tmp, M0AR, 0U);
  211. /* Reset DMAx_Streamy memory address register */
  212. LL_DMA_WriteReg(tmp, M1AR, 0U);
  213. /* Reset DMAx_Streamy FIFO control register */
  214. LL_DMA_WriteReg(tmp, FCR, 0x00000021U);
  215. /* Reset Channel register field for DMAx Stream*/
  216. LL_DMA_SetChannelSelection(DMAx, Stream, LL_DMA_CHANNEL_0);
  217. if(Stream == LL_DMA_STREAM_0)
  218. {
  219. /* Reset the Stream0 pending flags */
  220. DMAx->LIFCR = 0x0000003FU;
  221. }
  222. else if(Stream == LL_DMA_STREAM_1)
  223. {
  224. /* Reset the Stream1 pending flags */
  225. DMAx->LIFCR = 0x00000F40U;
  226. }
  227. else if(Stream == LL_DMA_STREAM_2)
  228. {
  229. /* Reset the Stream2 pending flags */
  230. DMAx->LIFCR = 0x003F0000U;
  231. }
  232. else if(Stream == LL_DMA_STREAM_3)
  233. {
  234. /* Reset the Stream3 pending flags */
  235. DMAx->LIFCR = 0x0F400000U;
  236. }
  237. else if(Stream == LL_DMA_STREAM_4)
  238. {
  239. /* Reset the Stream4 pending flags */
  240. DMAx->HIFCR = 0x0000003FU;
  241. }
  242. else if(Stream == LL_DMA_STREAM_5)
  243. {
  244. /* Reset the Stream5 pending flags */
  245. DMAx->HIFCR = 0x00000F40U;
  246. }
  247. else if(Stream == LL_DMA_STREAM_6)
  248. {
  249. /* Reset the Stream6 pending flags */
  250. DMAx->HIFCR = 0x003F0000U;
  251. }
  252. else if(Stream == LL_DMA_STREAM_7)
  253. {
  254. /* Reset the Stream7 pending flags */
  255. DMAx->HIFCR = 0x0F400000U;
  256. }
  257. else
  258. {
  259. status = ERROR;
  260. }
  261. }
  262. return status;
  263. }
  264. /**
  265. * @brief Initialize the DMA registers according to the specified parameters in DMA_InitStruct.
  266. * @note To convert DMAx_Streamy Instance to DMAx Instance and Streamy, use helper macros :
  267. * @arg @ref __LL_DMA_GET_INSTANCE
  268. * @arg @ref __LL_DMA_GET_STREAM
  269. * @param DMAx DMAx Instance
  270. * @param Stream This parameter can be one of the following values:
  271. * @arg @ref LL_DMA_STREAM_0
  272. * @arg @ref LL_DMA_STREAM_1
  273. * @arg @ref LL_DMA_STREAM_2
  274. * @arg @ref LL_DMA_STREAM_3
  275. * @arg @ref LL_DMA_STREAM_4
  276. * @arg @ref LL_DMA_STREAM_5
  277. * @arg @ref LL_DMA_STREAM_6
  278. * @arg @ref LL_DMA_STREAM_7
  279. * @param DMA_InitStruct pointer to a @ref LL_DMA_InitTypeDef structure.
  280. * @retval An ErrorStatus enumeration value:
  281. * - SUCCESS: DMA registers are initialized
  282. * - ERROR: Not applicable
  283. */
  284. uint32_t LL_DMA_Init(DMA_TypeDef *DMAx, uint32_t Stream, LL_DMA_InitTypeDef *DMA_InitStruct)
  285. {
  286. /* Check the DMA Instance DMAx and Stream parameters*/
  287. assert_param(IS_LL_DMA_ALL_STREAM_INSTANCE(DMAx, Stream));
  288. /* Check the DMA parameters from DMA_InitStruct */
  289. assert_param(IS_LL_DMA_DIRECTION(DMA_InitStruct->Direction));
  290. assert_param(IS_LL_DMA_MODE(DMA_InitStruct->Mode));
  291. assert_param(IS_LL_DMA_PERIPHINCMODE(DMA_InitStruct->PeriphOrM2MSrcIncMode));
  292. assert_param(IS_LL_DMA_MEMORYINCMODE(DMA_InitStruct->MemoryOrM2MDstIncMode));
  293. assert_param(IS_LL_DMA_PERIPHDATASIZE(DMA_InitStruct->PeriphOrM2MSrcDataSize));
  294. assert_param(IS_LL_DMA_MEMORYDATASIZE(DMA_InitStruct->MemoryOrM2MDstDataSize));
  295. assert_param(IS_LL_DMA_NBDATA(DMA_InitStruct->NbData));
  296. assert_param(IS_LL_DMA_CHANNEL(DMA_InitStruct->Channel));
  297. assert_param(IS_LL_DMA_PRIORITY(DMA_InitStruct->Priority));
  298. assert_param(IS_LL_DMA_FIFO_MODE_STATE(DMA_InitStruct->FIFOMode));
  299. /* Check the memory burst, peripheral burst and FIFO threshold parameters only
  300. when FIFO mode is enabled */
  301. if(DMA_InitStruct->FIFOMode != LL_DMA_FIFOMODE_DISABLE)
  302. {
  303. assert_param(IS_LL_DMA_FIFO_THRESHOLD(DMA_InitStruct->FIFOThreshold));
  304. assert_param(IS_LL_DMA_MEMORY_BURST(DMA_InitStruct->MemBurst));
  305. assert_param(IS_LL_DMA_PERIPHERAL_BURST(DMA_InitStruct->PeriphBurst));
  306. }
  307. /*---------------------------- DMAx SxCR Configuration ------------------------
  308. * Configure DMAx_Streamy: data transfer direction, data transfer mode,
  309. * peripheral and memory increment mode,
  310. * data size alignment and priority level with parameters :
  311. * - Direction: DMA_SxCR_DIR[1:0] bits
  312. * - Mode: DMA_SxCR_CIRC bit
  313. * - PeriphOrM2MSrcIncMode: DMA_SxCR_PINC bit
  314. * - MemoryOrM2MDstIncMode: DMA_SxCR_MINC bit
  315. * - PeriphOrM2MSrcDataSize: DMA_SxCR_PSIZE[1:0] bits
  316. * - MemoryOrM2MDstDataSize: DMA_SxCR_MSIZE[1:0] bits
  317. * - Priority: DMA_SxCR_PL[1:0] bits
  318. */
  319. LL_DMA_ConfigTransfer(DMAx, Stream, DMA_InitStruct->Direction | \
  320. DMA_InitStruct->Mode | \
  321. DMA_InitStruct->PeriphOrM2MSrcIncMode | \
  322. DMA_InitStruct->MemoryOrM2MDstIncMode | \
  323. DMA_InitStruct->PeriphOrM2MSrcDataSize | \
  324. DMA_InitStruct->MemoryOrM2MDstDataSize | \
  325. DMA_InitStruct->Priority
  326. );
  327. if(DMA_InitStruct->FIFOMode != LL_DMA_FIFOMODE_DISABLE)
  328. {
  329. /*---------------------------- DMAx SxFCR Configuration ------------------------
  330. * Configure DMAx_Streamy: fifo mode and fifo threshold with parameters :
  331. * - FIFOMode: DMA_SxFCR_DMDIS bit
  332. * - FIFOThreshold: DMA_SxFCR_FTH[1:0] bits
  333. */
  334. LL_DMA_ConfigFifo(DMAx, Stream, DMA_InitStruct->FIFOMode, DMA_InitStruct->FIFOThreshold);
  335. /*---------------------------- DMAx SxCR Configuration --------------------------
  336. * Configure DMAx_Streamy: memory burst transfer with parameters :
  337. * - MemBurst: DMA_SxCR_MBURST[1:0] bits
  338. */
  339. LL_DMA_SetMemoryBurstxfer(DMAx,Stream,DMA_InitStruct->MemBurst);
  340. /*---------------------------- DMAx SxCR Configuration --------------------------
  341. * Configure DMAx_Streamy: peripheral burst transfer with parameters :
  342. * - PeriphBurst: DMA_SxCR_PBURST[1:0] bits
  343. */
  344. LL_DMA_SetPeriphBurstxfer(DMAx,Stream,DMA_InitStruct->PeriphBurst);
  345. }
  346. /*-------------------------- DMAx SxM0AR Configuration --------------------------
  347. * Configure the memory or destination base address with parameter :
  348. * - MemoryOrM2MDstAddress: DMA_SxM0AR_M0A[31:0] bits
  349. */
  350. LL_DMA_SetMemoryAddress(DMAx, Stream, DMA_InitStruct->MemoryOrM2MDstAddress);
  351. /*-------------------------- DMAx SxPAR Configuration ---------------------------
  352. * Configure the peripheral or source base address with parameter :
  353. * - PeriphOrM2MSrcAddress: DMA_SxPAR_PA[31:0] bits
  354. */
  355. LL_DMA_SetPeriphAddress(DMAx, Stream, DMA_InitStruct->PeriphOrM2MSrcAddress);
  356. /*--------------------------- DMAx SxNDTR Configuration -------------------------
  357. * Configure the peripheral base address with parameter :
  358. * - NbData: DMA_SxNDT[15:0] bits
  359. */
  360. LL_DMA_SetDataLength(DMAx, Stream, DMA_InitStruct->NbData);
  361. /*--------------------------- DMA SxCR_CHSEL Configuration ----------------------
  362. * Configure the peripheral base address with parameter :
  363. * - PeriphRequest: DMA_SxCR_CHSEL[3:0] bits
  364. */
  365. LL_DMA_SetChannelSelection(DMAx, Stream, DMA_InitStruct->Channel);
  366. return SUCCESS;
  367. }
  368. /**
  369. * @brief Set each @ref LL_DMA_InitTypeDef field to default value.
  370. * @param DMA_InitStruct Pointer to a @ref LL_DMA_InitTypeDef structure.
  371. * @retval None
  372. */
  373. void LL_DMA_StructInit(LL_DMA_InitTypeDef *DMA_InitStruct)
  374. {
  375. /* Set DMA_InitStruct fields to default values */
  376. DMA_InitStruct->PeriphOrM2MSrcAddress = 0x00000000U;
  377. DMA_InitStruct->MemoryOrM2MDstAddress = 0x00000000U;
  378. DMA_InitStruct->Direction = LL_DMA_DIRECTION_PERIPH_TO_MEMORY;
  379. DMA_InitStruct->Mode = LL_DMA_MODE_NORMAL;
  380. DMA_InitStruct->PeriphOrM2MSrcIncMode = LL_DMA_PERIPH_NOINCREMENT;
  381. DMA_InitStruct->MemoryOrM2MDstIncMode = LL_DMA_MEMORY_NOINCREMENT;
  382. DMA_InitStruct->PeriphOrM2MSrcDataSize = LL_DMA_PDATAALIGN_BYTE;
  383. DMA_InitStruct->MemoryOrM2MDstDataSize = LL_DMA_MDATAALIGN_BYTE;
  384. DMA_InitStruct->NbData = 0x00000000U;
  385. DMA_InitStruct->Channel = LL_DMA_CHANNEL_0;
  386. DMA_InitStruct->Priority = LL_DMA_PRIORITY_LOW;
  387. DMA_InitStruct->FIFOMode = LL_DMA_FIFOMODE_DISABLE;
  388. DMA_InitStruct->FIFOThreshold = LL_DMA_FIFOTHRESHOLD_1_4;
  389. DMA_InitStruct->MemBurst = LL_DMA_MBURST_SINGLE;
  390. DMA_InitStruct->PeriphBurst = LL_DMA_PBURST_SINGLE;
  391. }
  392. /**
  393. * @}
  394. */
  395. /**
  396. * @}
  397. */
  398. /**
  399. * @}
  400. */
  401. #endif /* DMA1 || DMA2 */
  402. /**
  403. * @}
  404. */
  405. #endif /* USE_FULL_LL_DRIVER */
  406. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/