CubeMX USART1 with DMA, LL driver inits DMA streams before enabling DMA CLK
I have had a problem getting DMA TX for USART1 to work, no errors, stream gets enabled nut nothing is transferred, stream never complets. I am using LL driver for USART1.
I finally found the problem is that generated usart.c code inits DMA without enabling the CLK. Init of DMA is done after USART1. Eventually I found the "hidden" up/down arrows in CubeMX (scroll down the window) and could move call to MX_DMA_Init() up before other peripherals.
I am note sure if CubeMX is supposed to leave such detals to the user - I would not misssed it not using CubeMX but one assumes CubeMX has the brains to handle this dependency, or?
I have CubeMX 5.4.0 and STM32F413 MCU.