In my project I use STM32F303RC and I have two ADCs working with DMAs and triggered by a timer. ADC1 has two analog channels to be sampled, ADC4 only one. While I was working with CubeMX 4.17 I had no problems.
Then I updated CubeMX to 4.18. I did not change my program at all, but ADC1 stopped working correctly.
For some reason in the ADC1 configuration CubeMX added this part:
/**Configure the ADC multi-mode
multimode.DMAAccessMode = ADC_DMAACCESSMODE_DISABLED;
multimode.TwoSamplingDelay = ADC_TWOSAMPLINGDELAY_1CYCLE;
if (HAL_ADCEx_MultiModeConfigChannel(&hadc1, &multimode) != HAL_OK)
This caused the ADC1 to work correctly only in DEBUG mode but not in RUN mode. It took me a bit to find out that this was the cause. When I remove this initialization everything works fine again.
Now, my question is very easy: Is this Multi-mode correct, and I am doing something wrong not considering it, or it is inserted when it should not be?
Thank you very much!