Problem using multi channel ADC With DMA

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

Problem using multi channel ADC With DMA

1,402 Views
AD11
Contributor I

Hello,
Currently i've a problem using DMA with ADC.
My use case is: i've 6 ADC Channels, I am triggering adc with a sampling rate and after number of samples requested i want to get all samples in a one go or even after each sample the destination address of each buffer will be incremented internally.

so as an examples, rate is 1 sample per second and number of samples 5, so on first sec, DMA will read from first one then second one till fifth channel and increment each channel destination address by one. next sec it will read from first channel but it'll allocate in the second location of this channel buffer, then second and so on till fifth. and so on.

problem is descriptor never goes to the next one without being exhausted and if i defined number of transactions it will go to second one only after it fills all those transactions.
I successfully used timer to trigger ADC but i couldn't get that done using dma descriptors. i've used single conversion mode and burst mode but both didn't give me this approach.
can you help me with this

Labels (1)
0 Kudos
Reply
5 Replies

1,382 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 

 

Please tell us the part number of your chip/board?

 

BR

Alice

0 Kudos
Reply

1,368 Views
AD11
Contributor I

LPC54113

0 Kudos
Reply

1,359 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 ,

 

Recommend first have a look at the ADC+DMA demo under SDK:

Alice_Yang_0-1675735383074.png

Download from: https://mcuxpresso.nxp.com/en/select  

 

BR

Alice

 

 

 

0 Kudos
Reply

1,343 Views
AD11
Contributor I

yes i used this to build my app and it didn't work for me for that approach i posted 

0 Kudos
Reply

1,307 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 

What about the mainly issue? 6 ADC Channels can work well ? DMA only can read the first channel value? 

 

BR

Alice

0 Kudos
Reply