Storing ADC data in DMA

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Storing ADC data in DMA

1,504 Views
notanivipul
Contributor II

Hello,

I am using FRDM-KW38 development board for one of my projects. I am using 2 ADC channels to read analog data. I want to read from one channel and store the data in DMA. After it is done I want to read data from the other channel and parallelly perform operations on the data stored in DMA from ADC channel 1.

I am learning about DMAs for the first time. Can anyone help me with my problem.

 

Best regards,

Vipul

Labels (1)
0 Kudos
5 Replies

1,491 Views
nxf56274
NXP Employee
NXP Employee

Hi,

What is the parallel operations you need to do? DMA can be used to move the data from A to B without the CPU involved. You can't read the data from channel 1 and deal with the data from channel 2 at the same time.

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,488 Views
notanivipul
Contributor II

Hi @nxf56274

Maybe I phrased it wrong, I want to collect the ADC data in DMA channel 1 and when the channel is full, I want to transfer the data to memory to perform FFT. While performing FFT I want the next set of data from the ADC to be stored in DMA.

 

Best regards,

Vipul    

0 Kudos

1,479 Views
nxf56274
NXP Employee
NXP Employee

Hi,

Our adc example has the dma function. The example uses a flag to check if the dam transfer is complete. You can also check this flag. When the flag is set, you can perform FFT and start the second transfer. 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,463 Views
notanivipul
Contributor II

Hi @nxf56274 

Thanks for the reply.

Could you please guide me with the example code, I am not able to follow it - like I am not able to find the DMA function and what parameters are to be changed to make it functional.

Best Regards,

Vipul 

 

0 Kudos

1,458 Views
nxf56274
NXP Employee
NXP Employee

Hi,

I check the frdm-kw38 sdk. It doesn't have the adc dma example. But you can refer frdm-kl43z adc example. They have the similar architecture. 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos