<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックRe: LPC43xx ADC multiple channels with DMA</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633359#M24950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="285148" data-objecttype="3" href="https://community.nxp.com/people/mtenw"&gt;mtenw&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;1. When a timer match signal occurs, is channel 0 sampled first, then after 11 ADC clock cycles, channel 1 is sampled, ... and so on. Can anybody confirm this?&lt;/P&gt;&lt;P&gt;When ADC is configured to enable hardware-triggered mode, any value containing 1 to 8 ones is allowed versus only one of these bits should be 1( Seeing Fig 1).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-style: normal; font-variant: normal;"&gt;&lt;SPAN style="font-size: 15px;"&gt;The result of a hard-ware triggered conversion is stored in the individual channel data &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; color: #000000; font-style: normal; font-variant: normal;"&gt;registers DR0 to DR7. The global data register does not yield valid readings of a &lt;SPAN style="color: #000000; font-style: normal; font-variant: normal;"&gt;hardware-triggered conversion.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-variant: normal; color: #000000; font-size: 15px; font-style: normal;"&gt;So it's a little complicate to setup DMA to transfer the data from the different source address when per ADC DMA request generates and the approach is not desirable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/11478i07B6EFA820295EB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;Fig 1&lt;/P&gt;&lt;P&gt;Hope this is clear&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Dec 2016 06:25:11 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2016-12-21T06:25:11Z</dc:date>
    <item>
      <title>LPC43xx ADC multiple channels with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633355#M24946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to sample multiple channels from both ADC0 and ADC1 at the same time using timer match signal. Specifically, I am using LPC4370. Thanks to Rocky's previous post at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fcommunity.nxp.com%2Fmessage%2F829205" rel="nofollow" target="_blank"&gt;http://community.nxp.com/message/829205&lt;/A&gt;&lt;SPAN&gt;, I have a better idea of doing this. However, instead of using interrupts, I need to use DMA in order to sample multiple channels at higher rates, for example, 8 channels at ADC0 each at 50kHz. Some questions occur to me when I think of this approach:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. When a timer match signal occurs, is channel 0 sampled first, then after 11 ADC clock cycles, channel 1 is sampled, ... and so on. Can anybody confirm this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I want to keep samples from both ADC0 and ADC1 in memory in the order of the time that is sampled. Does it require 2 DMA channels? Can it be done using 1 DMA channel?&amp;nbsp; What is the best way to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thank you so much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 23:03:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633355#M24946</guid>
      <dc:creator>mtenw</dc:creator>
      <dc:date>2016-11-04T23:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: LPC43xx ADC multiple channels with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633356#M24947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder if NXP tech support or anyone in the forum could provide suggestions on this matter. Please help. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 19:32:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633356#M24947</guid>
      <dc:creator>mtenw</dc:creator>
      <dc:date>2016-12-09T19:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPC43xx ADC multiple channels with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633357#M24948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="285148" data-username="mtenw" href="https://community.nxp.com/people/mtenw"&gt;mtenw&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;1. When a timer match signal occurs, is channel 0 sampled first, then after 11 ADC clock cycles, channel 1 is sampled, ... and so on. Can anybody confirm this?&lt;/P&gt;&lt;P&gt;Yes, however the important drawback of the approach is the destination address variation, as the result of a hard-ware triggered conversion is stored in the individual channel data registers DR0 to DR7 and in software-controlled mode, only one of these bits should be 1.&lt;/P&gt;&lt;P&gt;2. I want to keep samples from both ADC0 and ADC1 in memory in the order of the time that is sampled. Does it require 2 DMA channels? Can it be done using 1 DMA channel?&amp;nbsp; What is the best way to do it?&lt;/P&gt;&lt;P&gt;Definitely, it should need two DMA channels.&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 08:00:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633357#M24948</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-12-20T08:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC43xx ADC multiple channels with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633358#M24949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reply. It is very helpful.&lt;/P&gt;&lt;P&gt;Could you please elaborate your answer for Question 1?&lt;/P&gt;&lt;P&gt;Specifically about the statement "only one of these bits should be 1", do you mean one of the bits in DR0 to DR7?&lt;/P&gt;&lt;P&gt;Also, could you please explain your statement about "important drawback of this approach"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 18:39:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633358#M24949</guid>
      <dc:creator>mtenw</dc:creator>
      <dc:date>2016-12-20T18:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: LPC43xx ADC multiple channels with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633359#M24950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="285148" data-objecttype="3" href="https://community.nxp.com/people/mtenw"&gt;mtenw&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;1. When a timer match signal occurs, is channel 0 sampled first, then after 11 ADC clock cycles, channel 1 is sampled, ... and so on. Can anybody confirm this?&lt;/P&gt;&lt;P&gt;When ADC is configured to enable hardware-triggered mode, any value containing 1 to 8 ones is allowed versus only one of these bits should be 1( Seeing Fig 1).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-style: normal; font-variant: normal;"&gt;&lt;SPAN style="font-size: 15px;"&gt;The result of a hard-ware triggered conversion is stored in the individual channel data &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; color: #000000; font-style: normal; font-variant: normal;"&gt;registers DR0 to DR7. The global data register does not yield valid readings of a &lt;SPAN style="color: #000000; font-style: normal; font-variant: normal;"&gt;hardware-triggered conversion.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-variant: normal; color: #000000; font-size: 15px; font-style: normal;"&gt;So it's a little complicate to setup DMA to transfer the data from the different source address when per ADC DMA request generates and the approach is not desirable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/11478i07B6EFA820295EB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;Fig 1&lt;/P&gt;&lt;P&gt;Hope this is clear&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2016 06:25:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633359#M24950</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-12-21T06:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPC43xx ADC multiple channels with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633360#M24951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the quick response. That clarifies my questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this brings back my original Question 2. If setting up different source addresses (DR0 to DR7) for DMA is not a desirable approach. What would you suggest to implement Question 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 18:50:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633360#M24951</guid>
      <dc:creator>mtenw</dc:creator>
      <dc:date>2016-12-22T18:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC43xx ADC multiple channels with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633361#M24952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="285148" data-objecttype="3" href="https://community.nxp.com/people/mtenw"&gt;mtenw&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;If setting up different source addresses (DR0 to DR7) for DMA is not a desirable approach. What would you suggest to implement Question 2?&lt;/P&gt;&lt;P&gt;In the Rocky's reply, it had pointed out the most important question: sample 2 analog source simultaneously. Now you want to integrate the DMA engine to achieve the &lt;SPAN&gt;higher sampling rate and definitely, the DMA engine is the better choice than fetch the sample data in the IRQ mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To implement it, the hardware source for the ADC is identical with the Rocky's proposal, to integrate the DMA engine, for instance, ADC0 use the DMA channel 0 and set the ADC0 as the DMA source request peripheral in the DMA channel configuration register, ADC1 can use another DMA channel except the channel 0 and set the ADC1 as the DMA source request peripheral in the DMA channel configuration register.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can learn the more information about the DMA flow control in the section 21.8.2 Flow control.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this is clear.&lt;/SPAN&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2016 02:20:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-ADC-multiple-channels-with-DMA/m-p/633361#M24952</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-12-23T02:20:59Z</dc:date>
    </item>
  </channel>
</rss>

