How to use Kinetis K66 with eDMA to scan muliti ADC channel?

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

How to use Kinetis K66 with eDMA to scan muliti ADC channel?

Jump to solution
1,259 Views
jetli
Contributor II

         Recently,I try to use Kinetis K66 with eDMA to achieve scan muliti ADC0 with channel 12,13,15,18,19.Each acquisition ADC0 channel 12,13,15,18,18 interval of 200us。The DMA interrupt is triggered every ten times to read the buffered data.

        My configuration is as follows:

①.configure PDB as every 200us to trigger ADC0.

②.configure ADC0 as Hardware trigger.every finish to request DMA transfer;

③.configure eDMA_Channel2,form ADC0_RA to ADC0_BUFF;

④.configure eDMA_Channel1,form ADC0_trigger to ADC0_SC2;    (Theoretically,It can change the ADC trigger mode SW or HW).

⑤.configure eDMA_Channel0,form ADC0_channel to ADC0_SC1A ;(Theoretically, It can change ADC0 next transaction channel );

      I know someone in the KL17 to achieve the three-tier DMA to achieve less CPU intervention in the collection, but I can not contact him. But I don‘t know whether K66 can also implement this process;

      my problem is: I can only achieve the two-tier DMA to transfer the data,But three can not,My idea is to achieve DMA channel 2 is transferred connect to DMA channel 1 each time the transfer completes two bytes, DMA channel 1 is transferred connect to DMA channel0 each time the transfer complete one byte.How do I configure DMA TCDs? 

Tags (4)
0 Kudos
1 Solution
790 Views
jetli
Contributor II

After trying, I finally know how to configure the TCD for ADC multi-channel timing without CPU intervention scan, still thank you.

View solution in original post

0 Kudos
3 Replies
790 Views
harlan86
Contributor I

Hello Jet,

Could you share details about your knowledge how to run DMA with number of ADC channels scanned sequentially?
What was incorrect in your original post? Or maybe you can share example project?

I have the same situation: I need to scan multiple ADC channels (8 channels) without CPU usage.

0 Kudos
790 Views
jetli
Contributor II

Oh,yes!But the supervisor did not allow me to reveal the source code . Do you have any other instant messaging methods? Like Hangouts \ wechat \ QQ? In this way I can share some of my debugging experience for you.

0 Kudos
791 Views
jetli
Contributor II

After trying, I finally know how to configure the TCD for ADC multi-channel timing without CPU intervention scan, still thank you.

0 Kudos