stm32f4xx_ll_dma.c 19 KB

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