cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L151: HAL ADC DMA wait for completion of transfer

Chrizzly
Associate III

Hello Guys, I want to read multiple channels from my adc using DMA.

However I want to implement it the following way:

while(1)

{

1. Start ADC DMA (scan, discontinous conv.)

2. Wait for the completion (the CPU should just wait until the conversion of the multiple channels is finished)

3. Continue with other code

}

Is there a simple way to implement the waiting?

(I know its not efficient to wait but this is what my use case requires)

2 REPLIES 2
Chrizzly
Associate III

I am still struggling, no one?

0693W00000Hnix8QAB.png[EDIT] I don't use Cube/HAL. https://github.com/STMicroelectronics/STM32CubeL1/blob/5641cb07a1d78d7e9649d056136e513bb273fcca/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_adc.c#L1196 maybe?

[EDIT2] EOCS value in description of EOC in the RM0038 section I've posted above appears to be wrong, can anybody please check me?

JW