Bug report: CubeMX generated ADC with DMA Code broken (wrong init order)
Board: NUCLEO-F446RE, STM32F446RE
CubeMX: 5.4.0
If you configure ADC1 with DMA, some configuration code for the DMA is placed into the ADC configuration code (stm32f4xx_hal_msp.c, line 152: if (HAL_DMA_Init(&hdma_adc1) != HAL_OK)).
But in the generated main.c, the DMA clock is switched on after this function is called, i.e. the function MX_DMA_Init() is called after MX_ADC1_Init(). So the configuration of the DMA is not applied, as the DMA is not clocked yet.
A workaround is to swap MX_DMA_Init and MX_ADC1_Init everytime you re-generate the code in CubeMX.
