adc edma how to configure ?

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

adc edma how to configure ?

1,451 次查看
vinaydevarkonda
Contributor I

Hello, I have been trying to implement ADC continuous conversions using eDMA. I have a K24 series kinetis microcontroller on a custom board. There are two ADC pins which I will be making use of, they are ADC0_DP0 and ADC1_DP1. Unfortunately I did not find any information on whether I should enable the GPIO port and pin configurations which in this case was not possible because in the pinout diagram there were no pins or ports for these ADC inputs. So, I assume I don't have to do anything. Furthermore, I wanted to enable eDMA on both these pins but I am not sure which DMA channel must be used for either of these adc pins. Can anyone please provide me some examples or a reference code where I can see some implementation.?

标签 (1)
标记 (2)
0 项奖励
回复
4 回复数

1,203 次查看
miduo
NXP Employee
NXP Employee

Hi,

The pins ADC0_DP0 and ADC1_DP1 do not multiplexed with GPIO function. So you do not need to config the PORT. For  the eDMA ADC tranfer, please have a look at below application note at a first:

https://www.nxp.com/docs/en/application-note/AN4590.pdf 

There also provide the sample code for this document:

https://www.nxp.com/docs/en/application-note-software/AN4590SW.zip 

I am not sure if you are using the KSDK, if yes, then please find the sample code here:( Provide by Marco Hess)

https://community.nxp.com/thread/330029

0 项奖励
回复

1,203 次查看
vinay_devarakon
Contributor II

Hello!

Thankyou for your Response. But I regret to inform you that it is absolutely frustrating just to understand your Concepts of Minor link and Major Link. I have gone through the Reference Manual, the Application Notes 4590, 4765 and also the document with the title "what is and how to configure the eDMA scatter / gather Feature". I have previously worked with other Microcontrollers and it was way easier to simply get Things working.

All I want to implement is , scan ADC measurements from three Independent Channels and save them in SRAM as three Elements of an Array. I want to start a ADC conversion only on one channel and the other ADC channels Need to start conversion one after the other in a cyclic manner. And the respective DMA conversions as well. And finally when the ADC and DMA conversions for the three Channels have finished, I want a DMA Interrupt so that I could do something with my Collected ADC measurements in SRAM.

I am stuck configuring the ADC and DMA in several different modes and configurations and nothing has worked till now. I  would request you to please suggest me the right Mode of Settings and overcome this Problem. And also I have a Problem finding the right example Code for a similar Use case. The Code which you have suggested in your Link is outdated and I dont find any relation to the existing Code. I could not even assign negative values for the DLAST_SGA value which is stated in all the application documents.

Your Application Documents make Things more complicated than simply help to overcome a Problem.

Your Suggestions are gretly appreciated!

Thankyou!

0 项奖励
回复

1,203 次查看
vinay_devarakon
Contributor II

I have successfully configured the ADC DMA and its working fine.

0 项奖励
回复

738 次查看
lecheverri
Contributor I
Hi friend, I need to do the same, could you share how to do it?
0 项奖励
回复