<?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 eDMA transmit completion and sequence on MPC5777C in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/eDMA-transmit-completion-and-sequence-on-MPC5777C/m-p/1334752#M19062</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am sending 12.800 byte from source to destination with eDMA 32 channel. I am initializing channels in turn from 0 to 31 without waiting channels to complete transmission. Each channel carry 400 byte.&lt;/P&gt;&lt;P&gt;I would like to learn what is the completion sequence among the channels. I supposed that first channel which I initialize would complete its transmission firstly. Also I supposed that the last channel which I initialize would complete its transmission lastly.&lt;/P&gt;&lt;P&gt;I would like to learn whether there is a relationship between starting sequence and finishing time.&lt;/P&gt;&lt;P&gt;I attached a part of my code about that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;volatile uint32_t i,j;&lt;BR /&gt;uint32_t sourceData[3200];&lt;BR /&gt;uint32_t destData[3200];&lt;/P&gt;&lt;P&gt;static void eDMA_Init(DMA_Type* dma, uint32_t channel, uint32_t *sourceAddr, uint32_t *destAddr, uint32_t ByteCount)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;// SOURCE ADRESS&lt;BR /&gt;dma-&amp;gt;TCD[channel].SADDR = (uint32_t)sourceAddr;&lt;BR /&gt;// SMOD AND DMOD ARE 0&lt;BR /&gt;// SSIZE AND DSIZE ARE 8 BIT (0X0)&lt;BR /&gt;dma-&amp;gt;TCD[channel].ATTR = 0x0000;&lt;BR /&gt;// SOFF IS 1 BYTE. AFTER COMPLETİNG A TRANSFER, THIS IS ADDED TO SDADDR.&lt;BR /&gt;dma-&amp;gt;TCD[channel].SOFF = 1;&lt;BR /&gt;// NBYTE IS 400&lt;BR /&gt;dma-&amp;gt;TCD[channel].NBYTES.MLNO = ByteCount;&lt;BR /&gt;// SLAST IS -400. THIS VALUE IS USED TO RETURN SADDR TO FIRST ADRESS VALUE&lt;BR /&gt;dma-&amp;gt;TCD[channel].SLAST = -ByteCount;&lt;BR /&gt;// DESTINATION ADRESS&lt;BR /&gt;dma-&amp;gt;TCD[channel].DADDR = (uint32_t) destAddr;&lt;BR /&gt;dma-&amp;gt;TCD[channel].DLASTSGA = -ByteCount;&lt;BR /&gt;// THE NUMBER OF MAJOR LOOP&lt;BR /&gt;dma-&amp;gt;TCD[channel].CITER.ELINKNO = 1;&lt;BR /&gt;// DOFF IS 1 BYTE. AFTER COMPLETİNG A TRANSFER, THIS IS ADDED TO DADDR.&lt;BR /&gt;dma-&amp;gt;TCD[channel].DOFF = 1;&lt;BR /&gt;// BITER IS EQUAL TO CITER. AFTER CITER REACHES O, CITER WILL BE EQUAL BITER AGAIN.&lt;BR /&gt;dma-&amp;gt;TCD[channel].BITER.ELINKNO = 1;&lt;BR /&gt;dma-&amp;gt;TCD[channel].CSR = 0;&lt;BR /&gt;DMA_0-&amp;gt;TCD[channel].CSR |= (0x1&amp;lt;&amp;lt;1);&lt;BR /&gt;dma-&amp;gt;CR = 0xC;&lt;BR /&gt;dma-&amp;gt;TCD[channel].CSR |= 0x1;&lt;BR /&gt;// SECOND WAY TO START DMA&lt;BR /&gt;//DMA_0-&amp;gt;SSRT = 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint32_t channel = 0;&lt;BR /&gt;uint32_t *p = sourceData;&lt;BR /&gt;uint32_t *q = destData;&lt;BR /&gt;for(channel = 0; channel&amp;lt;32; channel++)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;eDMA_Init(DMA_0, channel, p, q, 400);&lt;BR /&gt;p += 100;&lt;BR /&gt;q += 100;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Fri, 03 Sep 2021 09:20:06 GMT</pubDate>
    <dc:creator>berat24</dc:creator>
    <dc:date>2021-09-03T09:20:06Z</dc:date>
    <item>
      <title>eDMA transmit completion and sequence on MPC5777C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/eDMA-transmit-completion-and-sequence-on-MPC5777C/m-p/1334752#M19062</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am sending 12.800 byte from source to destination with eDMA 32 channel. I am initializing channels in turn from 0 to 31 without waiting channels to complete transmission. Each channel carry 400 byte.&lt;/P&gt;&lt;P&gt;I would like to learn what is the completion sequence among the channels. I supposed that first channel which I initialize would complete its transmission firstly. Also I supposed that the last channel which I initialize would complete its transmission lastly.&lt;/P&gt;&lt;P&gt;I would like to learn whether there is a relationship between starting sequence and finishing time.&lt;/P&gt;&lt;P&gt;I attached a part of my code about that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;volatile uint32_t i,j;&lt;BR /&gt;uint32_t sourceData[3200];&lt;BR /&gt;uint32_t destData[3200];&lt;/P&gt;&lt;P&gt;static void eDMA_Init(DMA_Type* dma, uint32_t channel, uint32_t *sourceAddr, uint32_t *destAddr, uint32_t ByteCount)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;// SOURCE ADRESS&lt;BR /&gt;dma-&amp;gt;TCD[channel].SADDR = (uint32_t)sourceAddr;&lt;BR /&gt;// SMOD AND DMOD ARE 0&lt;BR /&gt;// SSIZE AND DSIZE ARE 8 BIT (0X0)&lt;BR /&gt;dma-&amp;gt;TCD[channel].ATTR = 0x0000;&lt;BR /&gt;// SOFF IS 1 BYTE. AFTER COMPLETİNG A TRANSFER, THIS IS ADDED TO SDADDR.&lt;BR /&gt;dma-&amp;gt;TCD[channel].SOFF = 1;&lt;BR /&gt;// NBYTE IS 400&lt;BR /&gt;dma-&amp;gt;TCD[channel].NBYTES.MLNO = ByteCount;&lt;BR /&gt;// SLAST IS -400. THIS VALUE IS USED TO RETURN SADDR TO FIRST ADRESS VALUE&lt;BR /&gt;dma-&amp;gt;TCD[channel].SLAST = -ByteCount;&lt;BR /&gt;// DESTINATION ADRESS&lt;BR /&gt;dma-&amp;gt;TCD[channel].DADDR = (uint32_t) destAddr;&lt;BR /&gt;dma-&amp;gt;TCD[channel].DLASTSGA = -ByteCount;&lt;BR /&gt;// THE NUMBER OF MAJOR LOOP&lt;BR /&gt;dma-&amp;gt;TCD[channel].CITER.ELINKNO = 1;&lt;BR /&gt;// DOFF IS 1 BYTE. AFTER COMPLETİNG A TRANSFER, THIS IS ADDED TO DADDR.&lt;BR /&gt;dma-&amp;gt;TCD[channel].DOFF = 1;&lt;BR /&gt;// BITER IS EQUAL TO CITER. AFTER CITER REACHES O, CITER WILL BE EQUAL BITER AGAIN.&lt;BR /&gt;dma-&amp;gt;TCD[channel].BITER.ELINKNO = 1;&lt;BR /&gt;dma-&amp;gt;TCD[channel].CSR = 0;&lt;BR /&gt;DMA_0-&amp;gt;TCD[channel].CSR |= (0x1&amp;lt;&amp;lt;1);&lt;BR /&gt;dma-&amp;gt;CR = 0xC;&lt;BR /&gt;dma-&amp;gt;TCD[channel].CSR |= 0x1;&lt;BR /&gt;// SECOND WAY TO START DMA&lt;BR /&gt;//DMA_0-&amp;gt;SSRT = 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint32_t channel = 0;&lt;BR /&gt;uint32_t *p = sourceData;&lt;BR /&gt;uint32_t *q = destData;&lt;BR /&gt;for(channel = 0; channel&amp;lt;32; channel++)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;eDMA_Init(DMA_0, channel, p, q, 400);&lt;BR /&gt;p += 100;&lt;BR /&gt;q += 100;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 09:20:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/eDMA-transmit-completion-and-sequence-on-MPC5777C/m-p/1334752#M19062</guid>
      <dc:creator>berat24</dc:creator>
      <dc:date>2021-09-03T09:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: eDMA transmit completion and sequence on MPC5777C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/eDMA-transmit-completion-and-sequence-on-MPC5777C/m-p/1336091#M19088</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I can see that you configured CR register as 0xC. That means ERGA and ERCA bits are set, so Round Robbin Arbitration is configured for channel and group.&lt;/P&gt;
&lt;P&gt;You can take a look at section "16.6.3 Arbitration mode considerations" in the reference manual and especially at "16.6.3.3 Round-robin group arbitration, round-robin channel arbitration" to understand how it works. &lt;/P&gt;
&lt;P&gt;If you want to be sure that the channels are triggered one by one regardless of these priorities and arbitration, you can use linking. So, when one channel is finished, it starts another one, so you can create a chain starting at channel 0 and finishing at channel 31.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 12:12:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/eDMA-transmit-completion-and-sequence-on-MPC5777C/m-p/1336091#M19088</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-09-07T12:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: eDMA transmit completion and sequence on MPC5777C</title>
      <link>https://community.nxp.com/t5/MPC5xxx/eDMA-transmit-completion-and-sequence-on-MPC5777C/m-p/1336123#M19089</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Firstly, thank you for your response.&lt;/P&gt;&lt;P&gt;I waited done bit to initiliaze other channels on each transfer. Also, I used channel linking mode&amp;nbsp;after my question as you said&amp;nbsp; Both of them worked separately and I saw interrupts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 12:27:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/eDMA-transmit-completion-and-sequence-on-MPC5777C/m-p/1336123#M19089</guid>
      <dc:creator>berat24</dc:creator>
      <dc:date>2021-09-07T12:27:09Z</dc:date>
    </item>
  </channel>
</rss>

