2022-04-30 11:38 AM
When generate code via stm32cubeIDE from .ioc ,It Randomly generate line MX_DMA_Init(); Before / After other Module .
Problem is, When other module have some DMA config inside , for me ,it ADC , But MX_DMA_Init(); generate after MX_ADC1_Init(); , That mean __HAL_RCC_DMA2_CLK_ENABLE(); and __HAL_RCC_DMA1_CLK_ENABLE(); inside MX_DMA_Init(); not ativate when ADC config DMA inside HAL_ADC_MspInit , Clock for DMA is not enable when ADC DMA config happen, So that configs are void and don't have effect.
For me it appear randomly
I temperaly fix by add __HAL_RCC_DMA2_CLK_ENABLE();
__HAL_RCC_DMA1_CLK_ENABLE(); in /* USER CODE BEGIN SysInit */
Did we have some way to fixed the other of mx init sequence?
Sorry for my english
Solved! Go to Solution.
2022-04-30 12:12 PM
2022-04-30 12:12 PM