<?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 Re: Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7? in MCUXpresso Config Tools</title>
    <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011360#M915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry for the late reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked your code and it seems that the issue is when &lt;STRONG&gt;DMAMUX_EnableChannel&lt;/STRONG&gt; is executed before &lt;STRONG&gt;DMAMUX_EnablePeriodTrigger&lt;/STRONG&gt;. If you switch the order of this APIs you will get correct behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check the following note from the reference manual chapter 4.6.1.2.2:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;EM&gt;Before changing the trigger or source settings, a DMA channel must be disabled via CHCFGn[ENBL].&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Mar 2020 16:51:23 GMT</pubDate>
    <dc:creator>FelipeGarcia</dc:creator>
    <dc:date>2020-03-02T16:51:23Z</dc:date>
    <item>
      <title>Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011359#M914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in the attached project an eDMA Major Loop gets triggered after enabling peripheral requests in eDMA channel 0 despite no PIT trigger events occurred and therefore the first data is lost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The example simply copies the first 10 elements of sourceBuffer&lt;BR /&gt;&amp;nbsp; to the first 10 elements of destinationBuffer after a PIT CH0&lt;BR /&gt;&amp;nbsp; trigger (every 0.5 seconds) and fires an interrupt when finished.&lt;BR /&gt;&amp;nbsp; Every ISR run increments a counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; After the interrupt fired the buffers and the counter are printed to the&lt;BR /&gt;&amp;nbsp; DEBUG console. Afterwards the counter gets reset to 0 and the source buffer&lt;BR /&gt;&amp;nbsp; gets initialized with new data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The buffers are double the size in order to check correct eDMA settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. Initial setting as attached to this post&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The MCUXpresso Config Tool Peripheral setting for eDMA CH0 request is set&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; to DMAMUX always on.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Because of this setting the first eDMA Major Loop&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; transfer will be triggered after the function call&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EDMA_EnableChannelRequest(DMA0_DMA_BASEADDR, DMA0_CH0_DMA_CHANNEL);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; in peripherals.c line 181 despite the HRS register of DMA0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; not showing any hardware request. If you take a look at the TCD0_SADDR and&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TCD0_DADDR you see that the set values are correct before executing above&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function. After executing and enabling the channel request SADDR and&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DADDR get incremented by one and now show to an incorrect address.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The first expected data of 0x00 will not be transfered after the PIT channel&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; is started in main. Every following Transfer works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2. Now change the MCUXpresso Config Tool Peripheral setting for eDMA CH0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; request to DMAMUX disable and update the code. The DMAMUX will be enabled&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; before the PIT is started in main.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This way everything works as expected. The first data 0x00 gets transfered&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; to destinationBuffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The init function is not&amp;nbsp; following the Initialization chapter for DMAMUX of RT1020 Reference Manual.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &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/94535i149030D60DF87A8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&amp;nbsp; The chapter states that you first have to properly set up eDMA and PIT&lt;BR /&gt;&amp;nbsp; and afterwards enable DMAMUX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7?&lt;BR /&gt;Why is a eDMA transfer triggered in 1 if we enable DMAMUX first?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2020 12:41:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011359#M914</guid>
      <dc:creator>imxrtuser</dc:creator>
      <dc:date>2020-02-25T12:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011360#M915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry for the late reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked your code and it seems that the issue is when &lt;STRONG&gt;DMAMUX_EnableChannel&lt;/STRONG&gt; is executed before &lt;STRONG&gt;DMAMUX_EnablePeriodTrigger&lt;/STRONG&gt;. If you switch the order of this APIs you will get correct behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check the following note from the reference manual chapter 4.6.1.2.2:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;EM&gt;Before changing the trigger or source settings, a DMA channel must be disabled via CHCFGn[ENBL].&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2020 16:51:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011360#M915</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2020-03-02T16:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011361#M916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Felipe,&lt;/P&gt;&lt;P&gt;thank you for your answer.&lt;/P&gt;&lt;P&gt;The code is generated by MCUXpresso Config Tools. Will this get fixed in the next Config Tools release/ will there be a hotfix for it?&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2020 08:09:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011361#M916</guid>
      <dc:creator>imxrtuser</dc:creator>
      <dc:date>2020-03-03T08:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011362#M917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much for your feedback! The function call order will be fixed in the following Config Tools update and I prepare the hotfix as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2020 09:45:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011362#M917</guid>
      <dc:creator>martin_stano</dc:creator>
      <dc:date>2020-03-03T09:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011363#M918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in the attachment, there is hotfix for your issue. Please, follow the instructions inside the package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 10:35:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011363#M918</guid>
      <dc:creator>martin_stano</dc:creator>
      <dc:date>2020-03-05T10:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Is the DMAMUX/eDMA/PIT initialization order incorrect in Config Tools v7?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011364#M919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin,&lt;/P&gt;&lt;P&gt;he hotfix works. Thank you!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 09:17:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-Config-Tools/Is-the-DMAMUX-eDMA-PIT-initialization-order-incorrect-in-Config/m-p/1011364#M919</guid>
      <dc:creator>imxrtuser</dc:creator>
      <dc:date>2020-03-10T09:17:44Z</dc:date>
    </item>
  </channel>
</rss>

