<?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>topic Dynamically Adjusting the eDMA Destination Address K64F in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Dynamically-Adjusting-the-eDMA-Destination-Address-K64F/m-p/763250#M46487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to dynamically update the destination address on an eDMA channel to switch page buffers. &amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the K64F Freedom board to read an ADC channel.&amp;nbsp; The eDMA channel writes to a circular buffer using a modulo of 1024 (1 of 4 pages). I also use the Hardware Compare Mode of the ADC to fire if the ADC value is below a threshold.&amp;nbsp; As a rule, the ADC can fire prior to filling up the buffer and/or overflowing the modulo. When this happens, I want to switch buffer pages. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works except updating the eDMA DADDR register for the channel. After I update register with another page address, the channel goes back to the previous buffer (it appears to continue where it left off before the &amp;nbsp;&lt;/P&gt;&lt;P&gt;update).&amp;nbsp; I have read the &lt;STRONG&gt;Reference Manual, Section: 22.5.7 Dynamic programming&lt;/STRONG&gt;.&amp;nbsp; Also, in &lt;STRONG&gt;Section:&amp;nbsp;22.5.5.2 Reading the transfer descriptors of active channels&lt;/STRONG&gt;, it appears that the&amp;nbsp;&lt;STRONG&gt;TCDn_SADDR, TCDn_DADDR, and TCDn_NBYTES&lt;/STRONG&gt; registers are kept within the eDMA engine while the channel is active.&amp;nbsp; Does this mean that updating the hardware registers dynamically, won't actually change the DADDR&amp;nbsp; that is in process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is a work-around that I can use?&amp;nbsp; I tried clearing all of the registers for the channel.&amp;nbsp; I could use driver function that cancels the current transfer, but I have other channels operating on other things and it doesn't appear there is a way to cancel the transfer of a specific channel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Nov 2017 22:30:07 GMT</pubDate>
    <dc:creator>wildhorsemusic</dc:creator>
    <dc:date>2017-11-09T22:30:07Z</dc:date>
    <item>
      <title>Dynamically Adjusting the eDMA Destination Address K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Dynamically-Adjusting-the-eDMA-Destination-Address-K64F/m-p/763250#M46487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to dynamically update the destination address on an eDMA channel to switch page buffers. &amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the K64F Freedom board to read an ADC channel.&amp;nbsp; The eDMA channel writes to a circular buffer using a modulo of 1024 (1 of 4 pages). I also use the Hardware Compare Mode of the ADC to fire if the ADC value is below a threshold.&amp;nbsp; As a rule, the ADC can fire prior to filling up the buffer and/or overflowing the modulo. When this happens, I want to switch buffer pages. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works except updating the eDMA DADDR register for the channel. After I update register with another page address, the channel goes back to the previous buffer (it appears to continue where it left off before the &amp;nbsp;&lt;/P&gt;&lt;P&gt;update).&amp;nbsp; I have read the &lt;STRONG&gt;Reference Manual, Section: 22.5.7 Dynamic programming&lt;/STRONG&gt;.&amp;nbsp; Also, in &lt;STRONG&gt;Section:&amp;nbsp;22.5.5.2 Reading the transfer descriptors of active channels&lt;/STRONG&gt;, it appears that the&amp;nbsp;&lt;STRONG&gt;TCDn_SADDR, TCDn_DADDR, and TCDn_NBYTES&lt;/STRONG&gt; registers are kept within the eDMA engine while the channel is active.&amp;nbsp; Does this mean that updating the hardware registers dynamically, won't actually change the DADDR&amp;nbsp; that is in process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is a work-around that I can use?&amp;nbsp; I tried clearing all of the registers for the channel.&amp;nbsp; I could use driver function that cancels the current transfer, but I have other channels operating on other things and it doesn't appear there is a way to cancel the transfer of a specific channel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 22:30:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Dynamically-Adjusting-the-eDMA-Destination-Address-K64F/m-p/763250#M46487</guid>
      <dc:creator>wildhorsemusic</dc:creator>
      <dc:date>2017-11-09T22:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Adjusting the eDMA Destination Address K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Dynamically-Adjusting-the-eDMA-Destination-Address-K64F/m-p/763251#M46488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Duane&lt;/P&gt;&lt;P&gt;There is an application for you to refer to. Please find AN4590 in &lt;A href="http://www.nxp.com"&gt;www.nxp.com&lt;/A&gt;. I think it may useful to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 05:58:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Dynamically-Adjusting-the-eDMA-Destination-Address-K64F/m-p/763251#M46488</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2017-11-13T05:58:25Z</dc:date>
    </item>
  </channel>
</rss>

