cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303ze ADC1 and ADC3 timer triggered in DMA normal mode

DNYAR.1
Associate II
 
1 REPLY 1
DNYAR.1
Associate II

I am using the Nucleo F303ze board, 3 differential channels on ADC 1 and 3 differential channels on ADC 3. I will use DMA in normal mode and Timer 20 to trigger both ADC1 and ADC3 .

I am using STM32CudeIDE 1.12.1.

Regarding the DMA:

For ADC1 : DMA1 channel 1 global interrupt enabled

For ADC3: DMA2 channel 5 global interrupt enabled

I dont know if the following should solve my problem.

I have the following setup for my code in the while(1) loop and wondering how to determine when both DMA1 channel 1 and DMA2 channels have been filled to stop:

HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adcResultsDMA1, 3 *2048);

HAL_ADC_Start_DMA(&hadc3, (uint32_t*)adcResultsDMA3, 3 * 2048);

HAL_TIM_Base_Start(&htim20);

/ *** Code required to determine when DMA completed for both ADC1 and ADC3 ****/

// ADC DMA complete ISR exited

HAL_ADC_Stop_DMA(&hadc1);

HAL_ADC_Stop_DMA(&hadc3);

HAL_TIM_Base_Stop(&htim20);

Thanks

David Nyarko