<?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: DMA Transfer from GPIO</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/DMA-Transfer-from-GPIO/m-p/764507#M30793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="310609" data-username="lukebeno" href="https://community.nxp.com/people/lukebeno"&gt;Luke Beno&lt;/A&gt;,&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;for the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Maybe the thread will inspire you configure the DMA operation in right way.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;&lt;A href="https://community.nxp.com/docs/DOC-334851"&gt;DMA Ping-Pong application&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;P&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jan 2018 02:27:27 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2018-01-08T02:27:27Z</dc:date>
    <item>
      <title>DMA Transfer from GPIO</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/DMA-Transfer-from-GPIO/m-p/764506#M30792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using LPC54114 and&amp;nbsp;would like to trigger a DMA transfer every time that a rising edge occurs on a GPIO pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have the pin setup using the config tool like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/39707i753C76302DF02C8B/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code for configuring the DMA channel 0:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;dma_channel_trigger_t channel_trigger&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
channel_trigger&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;burst &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; kDMA_SingleTransfer &lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
channel_trigger&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; kDMA_RisingEdgeTrigger&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
channel_trigger&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;wrap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; kDMA_NoWrap&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token function"&gt;DMA_Init&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;DMA0&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;DMA_EnableChannel&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;DMA0&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;DMA_CreateHandle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;g_DMA_Handle&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; DMA0&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;DMA_SetCallback&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;g_DMA_Handle&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; DMA_Callback&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; NULL&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;DMA_PrepareTransfer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;transferConfig&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;CTIMER0&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;TC &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; destAddr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;sizeof&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;srcAddr&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;sizeof&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;srcAddr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; kDMA_MemoryToMemory&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; NULL&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
transferConfig&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;xfercfg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;srcInc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
DMA_ConfigureChannelTrigger&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;DMA0&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;channel_trigger&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;DMA_SubmitTransfer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;g_DMA_Handle&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;transferConfig&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;DMA_StartTransfer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;g_DMA_Handle&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not seem and though the trigger is happening.&amp;nbsp; Its not surprising&amp;nbsp; because I think that the channel trigger is still routed to ADC0 Sequence A interrupt as shown in Table 217 of the user guide:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/39857iFB728428BD64CF41/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I've read through the documents but cannot figure out how to properly route this trigger to the DMA.&amp;nbsp; It makes me question if it is even possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess an alternative would be to configure the GPIO to generate a pin interrupt and then use one of these to trigger DMA but I still have hope that I don't need this extra step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly, it's sort of a shame that CTIMER CAP events cannot trigger DMA transfers on this part.&amp;nbsp; At least that what I decided after reading the documents.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:06:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/DMA-Transfer-from-GPIO/m-p/764506#M30792</guid>
      <dc:creator>lukebeno</dc:creator>
      <dc:date>2020-11-02T14:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: DMA Transfer from GPIO</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/DMA-Transfer-from-GPIO/m-p/764507#M30793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="310609" data-username="lukebeno" href="https://community.nxp.com/people/lukebeno"&gt;Luke Beno&lt;/A&gt;,&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;for the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Maybe the thread will inspire you configure the DMA operation in right way.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;&lt;A href="https://community.nxp.com/docs/DOC-334851"&gt;DMA Ping-Pong application&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;P&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 02:27:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/DMA-Transfer-from-GPIO/m-p/764507#M30793</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-01-08T02:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: DMA Transfer from GPIO</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/DMA-Transfer-from-GPIO/m-p/764508#M30794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, the DMA example was not really helpful but I was able to figure out the issue.&amp;nbsp; The Pin config tool obscures the fact that you are creating a PINT and then linking that to the DMA event.&amp;nbsp; The other caveat is that they PINT Interrupt appears to need to be enabled in order to trigger the DMA.&amp;nbsp; Which unfortunate because that means that the CPU also needs to be interrupted as well.&amp;nbsp; In the end I found that I could "ARM" the IRQ to trigger once and then let the DMA continuously&amp;nbsp;run.&amp;nbsp; Not the most elegant approach but it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 04:56:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/DMA-Transfer-from-GPIO/m-p/764508#M30794</guid>
      <dc:creator>lukebeno</dc:creator>
      <dc:date>2018-01-30T04:56:33Z</dc:date>
    </item>
  </channel>
</rss>

