<?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: DMA vs EDMA. increment source/destination adresses in GCT in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1190633#M15512</link>
    <description>&lt;P&gt;Hi, Fasih,&lt;/P&gt;
&lt;P&gt;Because the ADC result register is 0xE50E(Result0), 0xE50F(Result1), 0xE510(Result2),..., so the Result offset should be 2 in Byte.&lt;/P&gt;
&lt;P&gt;so&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;octl(EDMA_0, DMACH_SET_SOURCE_ADDRESS_OFFSET, 0x0);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;should be&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;octl(EDMA_0, DMACH_SET_SOURCE_ADDRESS_OFFSET, 0x2);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Pls have a try.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BR&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;XiangJun Rong&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Nov 2020 05:31:20 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2020-11-30T05:31:20Z</dc:date>
    <item>
      <title>DMA vs EDMA. increment source/destination adresses in GCT</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1185167#M15504</link>
      <description>&lt;P&gt;Hey ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im porting my code from mc56f82748 (uses DMA) to mc56f83763 (uses EDMA).&lt;/P&gt;&lt;P&gt;I can get the DMA to read the first source address data of ADC_0 , but not the next two addresses (which are shown as zero in freemaster). I am trying to read the next&amp;nbsp; two ADC_1 and ADC_2 samples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from this I think there is something to do with incrementing adresses which is missing in new EDMA. Its it perhaps now called as minor and major loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I need to choose to have the auto increment in the background so I can also read the next adresses?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My source address is in words so E50Eh is 1CA1C&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/26034"&gt;@xiangjun_rong&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/13026"&gt;@ZhangJennie&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fasihahmed_0-1605696832734.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130383i34C9C8F09BA02217/image-size/large?v=v2&amp;amp;px=999" role="button" title="fasihahmed_0-1605696832734.png" alt="fasihahmed_0-1605696832734.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fasihahmed_0-1605697235432.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130384iC6D843318F2CE7E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="fasihahmed_0-1605697235432.png" alt="fasihahmed_0-1605697235432.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 11:09:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1185167#M15504</guid>
      <dc:creator>fasihahmed</dc:creator>
      <dc:date>2020-11-18T11:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: DMA vs EDMA. increment source/destination adresses in GCT</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1185838#M15505</link>
      <description>&lt;P&gt;Hi, Fasih,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1605772195309.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130476iE565111C452ABA0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1605772195309.png" alt="xiangjun_rong_0-1605772195309.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For the above screen, I think you need just check the "source minor loop mapping" box, uncheck "destination minor loop mapping" box, furthermore, uncheck the "Channel Linking On Loop Complete"&lt;/P&gt;
&lt;P&gt;Because the ADC Result Register is TWO bytes, if you sample 3 ADC channel(sample0/1/2), I suppose that the Minor-loop Offset box should be -6, minor loop in major loop should be +6. Anyway, after the QuickStart configuration, pls check the following Fig:&lt;/P&gt;
&lt;P&gt;The SMLOE bit is set, the DMLOE is cleared, the MLOFF bit should be -6(in complementary format), the NBYTES bits should be 6. after you configure the Quick Start tools, if the TCD0_NBYTES_MLOFFYES register is NOT the above value, you have to reconfigure the quick start until it is the value.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;DIV id="tinyMceEditorxiangjun_rong_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="tinyMceEditorxiangjun_rong_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eDMA_Reg.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130483i4A32732411FE7835/image-size/large?v=v2&amp;amp;px=999" role="button" title="eDMA_Reg.png" alt="eDMA_Reg.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 08:11:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1185838#M15505</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-11-19T08:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: DMA vs EDMA. increment source/destination adresses in GCT</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1188746#M15510</link>
      <description>&lt;P&gt;&lt;STRONG&gt;void GOC_Iphase_DMA_ReInit(void)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA, DMA_SET_DMA_REQUEST_0, DMA_DISABLE); // Disable peripheral request before modifying DMA registers&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;/*******************/&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;/* set values */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA_0, DMACH_SET_SOURCE_ADDRESS_OFFSET, 0x0);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA_0, DMACH_SET_NBYTES_WITH_MLOFF, -6);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA_0, DMACH_SET_SOURCE_ADDRESS_OFFSET, set_source_adress);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA_0, DMACH_SET_NBYTES_WITH_MLOFF, nBYTES_value);/* set number of bytes to transfer*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;uw32Address = (UWord32)&amp;amp;(w16IphaseArray[0]);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;// set destination address to first member of the structure&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA_0, DMACH_SET_DESTINATION_ADDRESS, uw32Address&amp;lt;&amp;lt;1 );&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA_0, DMACH_SET_SOURCE_ADDRESS, 0x1CA1C);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;// clear interrupt flag and enable next transfer by writing BCR registers&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl(EDMA, DMA_SET_DMA_REQUEST_0, DMA_ENABLE); // Enable peripheral request to initiate the DMA transfer&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i still have issues trying to get all the three current ADC results. I have only the first ADC sample showing up. I have attached my code above for you to get an idea of what im probably missing out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/26034"&gt;@xiangjun_rong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 14:19:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1188746#M15510</guid>
      <dc:creator>fasihahmed</dc:creator>
      <dc:date>2020-11-26T14:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: DMA vs EDMA. increment source/destination adresses in GCT</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1190633#M15512</link>
      <description>&lt;P&gt;Hi, Fasih,&lt;/P&gt;
&lt;P&gt;Because the ADC result register is 0xE50E(Result0), 0xE50F(Result1), 0xE510(Result2),..., so the Result offset should be 2 in Byte.&lt;/P&gt;
&lt;P&gt;so&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;octl(EDMA_0, DMACH_SET_SOURCE_ADDRESS_OFFSET, 0x0);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;should be&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;octl(EDMA_0, DMACH_SET_SOURCE_ADDRESS_OFFSET, 0x2);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Pls have a try.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BR&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;XiangJun Rong&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 05:31:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/DMA-vs-EDMA-increment-source-destination-adresses-in-GCT/m-p/1190633#M15512</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-11-30T05:31:20Z</dc:date>
    </item>
  </channel>
</rss>

