Skip to main content
NKarn.1
Associate II
March 19, 2020
Question

how to use 4 channels of ADC(192 KHz signal) with DMA such that out of total decided buffer size of 4096, we can populate the first 1024 buffers with ADC channel 1 , second 1024 buffers with adc channel 2 and so on ?

  • March 19, 2020
  • 3 replies
  • 1355 views

I am building a radar back end wherein I have to process 4 ADC channels coming in from radar front end and want to do processing on each channel and want to store the adc values in the buffer so that I can do DSP on it.

This topic has been closed for replies.

3 replies

TDK
March 19, 2020

This cannot be done directly out of the DMA. You'll have to postprocess the values to arrange them how you want.

"If you feel a post has answered your question, please click ""Accept as Solution""."
NKarn.1
NKarn.1Author
Associate II
March 19, 2020

Hi ,Thanks for the reply. Can you elaborate on what you meant by postprocessing the values.?

TDK
March 19, 2020

Suppose your buffer length is 16. When the ADC/DMA is complete, your values in memory will be

`1234123412341234`

where 1 is a result from channel 1, 2 is from channel 2, etc.

You need to rearrange them so they are in the order:

`1111222233334444`

There's probably a way to do this with a minimal amount of temporary storage needed, but you could also create a separate 4096 size buffer and move them into that buffer in the correct order.

"If you feel a post has answered your question, please click ""Accept as Solution""."
NKarn.1
NKarn.1Author
Associate II
March 19, 2020

Thanks... I will keep you informed about it goes.

waclawek.jan
Super User
March 19, 2020

The DSP routines can be written/modified so that they take into account the staggered input data. Unless you want to throw at them some prechewed libraries you don't have sources for.

JW

NKarn.1
NKarn.1Author
Associate II
March 19, 2020

Thanks... I will keep you informed about it goes.