I'm setting up Dual Regular Simultaneous mode on my STM32H533RE and I cane across a problem. When the code is gerated, both MX_ADC1_Init() and MX_ADC2_Init() end up with this:
/** Configure the ADC multi-mode
*/
// multimode.Mode = ADC_DUALMODE_REGSIMULT;
// multimode.DMAAccessMode = ADC_DMAACCESSMODE_12_10_BITS;
// multimode.TwoSamplingDelay = ADC_TWOSAMPLINGDELAY_1CYCLE;
// if (HAL_ADCEx_MultiModeConfigChannel(&hadc2, &multimode) != HAL_OK)
// {
// Error_Handler();
// }
WhereHAL_ADCEx_MultiModeConfiChannel expects MASTER as the first argument.
So when I start up, ADC1 inits fine, but ADC2 fails because it tries to run that above function
with hadc2 as the master, even though it is a slave, and has a HAL config error.
If I comment out the above block on MX_ADC2_Init, all seems to work well.
Is this a bug? Or can I do something different in CubeMX to make this not happen?