cancel
Showing results for 
Search instead for 
Did you mean: 

ADC_DMA

YHaag
Associate

I'm new to the topic and have a basic question.

I set up a ADC_DMA transfer to read sensor values: HAL_ADC_Start_DMA(&hadc1, (uint32_t*)&ADC1ConvertedValue, 1)

This works to always update the ADC1ConvertedValue variable to the latest value.

But how can I adjust my buffer size? In the end I would like to read for example 1000 values, then get an interrupt and use those 1000 values all at a time.

Thanks a lot and forgive me if the question is stupid ;)

1 REPLY 1
S.Ma
Principal

Use dma cyclically on 2000 samples. Half transfer 1000 interrupt will occur so you can process 1000 samples in the same time it wilk take to receive the other half.