2021-09-30 03:14 PM
I am using STMCubeIDE version 1.7.0 and I saw the generate code for the initialization
has different orders when I configured my ADC with DMA
Sometime the code was generate with ADC init before the DMA init
MX_ADC1_Init();
MX_ADC3_Init();
MX_DMA_Init();
Sometime the code was generate with DMA init before ADC init
MX_DMA_Init();
MX_ADC1_Init();
MX_ADC3_Init();
Is there a rule for the auto generated code orders?
Solved! Go to Solution.
2021-09-30 04:53 PM
Thank you TDK. Seem like not me struggling with ADC DMA not working because this not in the right sequence order.
2021-09-30 04:44 PM
It’s in there somewhere. Possibly in code generation tab somewhere. I can’t check right now.
edit: in advanced settings somewhere.
2021-09-30 04:53 PM
Thank you TDK. Seem like not me struggling with ADC DMA not working because this not in the right sequence order.
2021-10-01 01:23 AM
Hello @Jtron.1 ,
I confirm this issue in CubeMX v6.3.0, that the DMA Init function is called after the peripheral initialization.
So, when DMA is used, the MX_DMA_Init() shall be called BEFORE any other peripheral initialization.
Our CubeMx team is working to resolve this issue in the coming releases.
(Internal ticket 112040 : This is an internal tracking number and is not accessible or usable by customers.)
Thanks for your contribution
Imen