cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405 Multiple ADC multiple channels DMA problem

pschirrer
Visitor

Hi all, I am desperately trying to sample 15 ADC channels using the 3 ADCs of the F405.

First I tried using the multi ADC triple mode, with 5 channels set for each ADC. I used DMA to transfer data to memory. It seems to work, but I get garbage data in memory.

Then, as an alternate solution, I decided to use the 3 ADCs in independent mode and perform 3 ADC scans of 5 channels on the 3 ADCs, again with DMA.

Strangely, I only get one sample by each ADC instead of the 5 expected. Every DMA calls the HAL_ADC_ConvCplCallback as it should, but memory contains only this one sample value. Every ADC also has the overrun bit set in its status register.

I do not understand what is wrong.

My setup is : my own board using a STM32F405. I use CubeMX and the HAL with FreeRTOS.

Attached the main.c and .ioc files showing the init of the ADC, DMA and start of the ADC with DMA.

Thanks in advance for your help.

0 REPLIES 0