cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 Multichannel ADC and DMA

v23
Associate
Posted on June 22, 2015 at 17:21

deleted

#adc #dma #stm32f0
2 REPLIES 2
raptorhal2
Lead
Posted on June 22, 2015 at 17:56

Compare your code with the ADC_DMA_Transfer example in the F0 Cube Nucleo ADC examples. The HAL_ADC_Start after the HAL_ADC_Start_DMA is not required.

Cheers, Hal

v23
Associate
Posted on June 22, 2015 at 18:28

Thanks, I found the example. It looks like the ADC1 interrupt in this example is disabled. I already tried disabling the ADC IRQ, but this resulted in garbage values in my Buffer.

Tomorrow I will try to leave out the HAL_ADC_Start().

Also, I'm not sure if I got it right.

The ADC gets the value for channel 1 e.g., triggers the DMA; the DMA writes ADC1_DR to ADCBuffer[0] and this goes on until the last of the 4 ADC channels and then the DMA IRQ goes off, when it's done with all 4 channels?

Is the DMA Interrupt necessary? I don't want to do anything with the values right after the conversion. I just want to have the newest value in my buffer for my functions in main to work with.