Question
ADC + DMA circular mode
Posted on April 06, 2016 at 08:38
Hello there,
I am trying to configure ADC and DMA (STM32F4) to work in circullar mode but I fail. There is a lot more conversions than there should be and they are starving other ''processes'' in the mcu. This is what I am trying to do exacly. TIM8 is running at 20k (PWM, center aligned). An update event of TIM8, should trigger ADC that would measure 8 samples (2 channels, 4 samples per channel, one by one). At the end of those 8 conversions an interrupt should be triggered and this would go on and on after. This is my configuration: ADC3: DMA: I start the DMA with: retVal += HAL_ADC_Start_DMA(motor->currentLoopAdc, (uint32_t*)motor->adcSamples, motor->adcSamplesMax); adcSamples is an array of 16 elements (int16). adcSamplesMax at this moment is 8, as I want to take 8 measurements. I would apreciate all help!