2017-02-03 05:59 AM
Hello
When I initialize ADC1 as master and ADC2 as slave in dual fast interleaved mode in CubeMX and generate the code, cpu hangs at MX_ADC2_Init(); . After some research I found that in MX_ADC1_Init(); and MX_ADC2_Init(); the below lines are written:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
multimode.Mode = ADC_DUALMODE_INTERLFAST;
if (HAL_ADCEx_MultiModeConfigChannel(&hadc1, &multimode) != HAL_OK) { Error_Handler(); }////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
when I commented these lines in MX_ADC2_Init(); all of the problems solved.
I have attached my main.c code and .ioc file.(problem has been fixed in the main.c file)
thanks....
#stmcubemx-bug-report #adc-dual-fast-interleaved-moed2017-02-25 04:40 AM
Same problem here with a stm32f103CBT6, hangs on MX_ADC2_Init(); Though I am using ADC_DUALMODE_REGSIMULT.
Workaround for me is not only deleting
multimode.Mode = ADC_DUALMODE_REGSIMULT;
if (HAL_ADCEx_MultiModeConfigChannel(&hadc2, &multimode) != HAL_OK) { Error_Handler(); }But also deleting everything hadc2.Init and replacing with hadc2.Init = hadc1.Init;