Problem using multi channel ADC With DMA

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem using multi channel ADC With DMA

2,389 次查看
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

标签 (1)
0 项奖励
回复
5 回复数

2,369 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AD11 

 

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

 

BR

Alice

0 项奖励
回复

2,355 次查看
AD11
Contributor I

LPC54113

0 项奖励
回复

2,346 次查看
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 项奖励
回复

2,330 次查看
AD11
Contributor I

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

0 项奖励
回复

2,294 次查看
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 项奖励
回复