cancel
Showing results for 
Search instead for 
Did you mean: 

ADC dma without loseing samples

kchin.2
Associate II

Hi ,

i am using adc dma multibuffer mode and first buff =1000 seconf buff =1000

after getting completed call back i am switching the buffer and starting multidma_buffer again but in this case i am lossing some data when i processing completed call back .

is there any way to get adc_dma data without losing for 5sec . per sec i will get 100000 samples

can anyone please help me on this.

4 REPLIES 4

Use circular DMA.

JW

kchin2_0-1691462987635.png

after configuring adc dma in circular mode we are still getting the missing samples from adc

The picture you are showing doesn't help us as long as we don't know how data should look...

Which STM32? ADC setup? DMA setup?

> 5sec . per sec i will get 100000 samples

Do you mean you want to collect data over 5 seconds with 100 kHz sampling rate?
You might run out of internal RAM...

KnarfB
Principal III

Your problem description is very vague, missing important facts as @LCE already pointed out. Show code snippets, give detailed observations. IMHO you didn't loose samples,the curve looks smooth but interspersed with periods of 0.

If one half of each buffer stays 0 (as I concluded from the diagram), or every other buffer, you may be a factor of 2 off in some settings, like providing the length in bytes where the length in samples was expected or such.

hth

KnarfB