Skip to main content
mehmetcanbalci
Associate III
December 25, 2018
Question

How to get multiple adc channels in to multiple buffers with dma ?

  • December 25, 2018
  • 2 replies
  • 1170 views

Hello , is there any way to ready multiple adc channels for adc1 in to multiple buffer with dma parallely ?

In existing configuration i can read circular and continuous 2 adc channel of adc1 in to a single buffer with dma. So buffer's first element is channel1 , second is channel2, third is channel1 again and so on..

but my desire is there would be 2 independent buffers which holding 2 channels data.

i can seperate even or odd indexes after reading but i dont want to do that way. is there any automatic way to swap buffer for each channel ? if there is no , is there any way to memory to memory dma operation which is reading memory with increment 2 each time.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
December 25, 2018

Doesn't work that way, fill a larger buffer, and de-interleave periodically.

Alternative is to use two ADC units, each with a DMA assigned, and use a common trigger source.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
S.Ma
Principal
December 26, 2018

Maybe using another DMA for memory to memory transfer. However, regrouping each channel as contiguous memory area would require bus cycles for possibly no processing value.

create a structure describing the interleaved channel element (2x16 bit) then create the array which you can scan for processing (FFT or else). Otherwise, make it for dual channel a 32 bit element array and mask.