cancel
Showing results for 
Search instead for 
Did you mean: 

ADC in dual simultanious mode

pooyan
Associate
Posted on September 15, 2016 at 23:51

Hello everyone!

I have issue with initializing ADC1 and ADC2 in  regular simultanious mode + DMA.

I am using CubeMx and Hal drivers. Here is my configuration.

http://s8.picofile.com/file/8267541418/1.JPG

http://s8.picofile.com/file/8267541426/2.JPG

http://s8.picofile.com/file/8267541450/3.JPG

and I start ADCs with these functions.

    HAL_ADC_Start(&hadc2);

    HAL_ADCEx_MultiModeStart_DMA(&hadc1,(uint32_t *)adcData,3);

but no success. Cpu hangs after calling MX_ADC2_Init().

Is there anything wrong?

Any example or guide?

thanks a lot.

#stm32f103c8t6
2 REPLIES 2
slimen
Senior
pooyan
Associate
Posted on September 16, 2016 at 23:22

thanks for your reply.

I've read these documents, but still I don't know what is wrong. My configuration in CubeMx is correct and I start the ADCs just like that example. However as I mentioned CPU hangs at MX_ADC2_Init() before calling:

    HAL_ADC_Start(&hadc2);

    HAL_ADCEx_MultiModeStart_DMA(&hadc1,(uint32_t *)adcData,3);

Is it possible that it is CubeMx bug?

thanks in advance