<?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>Kinetis Microcontrollers中的主题 Re: DMA UART K60 Error</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170301#M58554</link>
    <description>&lt;P&gt;Then how to resolve this. Whether DMA is helpful in UART peripheral.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2020 10:52:29 GMT</pubDate>
    <dc:creator>mdrasool_yadwad</dc:creator>
    <dc:date>2020-10-20T10:52:29Z</dc:date>
    <item>
      <title>DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1168830#M58529</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am attaching my code please help me out in this. I want to transfer a char array on to putty using UART by raising DMA request. It is printing only the first element. please help me in this&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 10:22:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1168830#M58529</guid>
      <dc:creator>mdrasool_yadwad</dc:creator>
      <dc:date>2020-10-16T10:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1168931#M58530</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If you can send one byte from a buffer with DMA_TCD_CITER_ELINK set to 1, you should be able to send multiple bytes by just setting DMA_TCD_CITER_ELINK to the number of bytes too be sent. &lt;EM&gt;There should be nothing else to do&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;However, make sure that you DO NOT TOUCH the DMA in operation until it has completed; either poll its operation or use its end of transfer interrupt to detect its completion.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;It is best to use the "Insert Code" method to show code since reading code from screen shots is not very practical (especially if a line is to be copied as a quote, for example).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;BR /&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;BR /&gt;&lt;FONT color="#999999"&gt;Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 14:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1168931#M58530</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-10-16T14:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1169295#M58535</link>
      <description>&lt;P&gt;Below is my code please do check and correct me if there are any corrections&amp;nbsp;&lt;/P&gt;&lt;P&gt;//source address&lt;BR /&gt;DMA_TCD0_SADDR = (uint32_t)a;&lt;BR /&gt;&lt;BR /&gt;/* Source offset disabled */&lt;BR /&gt;DMA_TCD0_SOFF = 0x01;&lt;BR /&gt;&lt;BR /&gt;//Source data transfer size and Destination data transfer size&lt;BR /&gt;DMA_TCD0_ATTR=DMA_ATTR_SSIZE(0x00)|DMA_ATTR_DSIZE(0x00);&lt;BR /&gt;&lt;BR /&gt;DMA_TCD0_NBYTES_MLNO= 0x04;&lt;BR /&gt;&lt;BR /&gt;//Destination address&lt;BR /&gt;DMA_TCD0_DADDR =0x400EB007;&lt;BR /&gt;&lt;BR /&gt;DMA_TCD0_CITER_ELINKNO = DMA_CITER_ELINKNO_CITER(4);&lt;BR /&gt;/* No adjustment to destination address */&lt;BR /&gt;DMA_TCD0_DLASTSGA = 0x00;&lt;BR /&gt;&lt;BR /&gt;DMA_TCD0_BITER_ELINKNO = DMA_BITER_ELINKNO_BITER(4);&lt;BR /&gt;&lt;BR /&gt;DMA_SERQ |= DMA_SERQ_SERQ_MASK;&lt;BR /&gt;DMA_TCD0_CSR = DMA_CSR_START_MASK;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 03:52:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1169295#M58535</guid>
      <dc:creator>mdrasool_yadwad</dc:creator>
      <dc:date>2020-10-19T03:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1169597#M58541</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DMA_TCD0_SOFF = 0x01;&lt;BR /&gt;is correct but DMA_TCD0_DOFF = 0;&lt;BR /&gt;should be added (and the comment corrected)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DMA_TCD0_DLASTSGA = 0x00;&lt;BR /&gt;is correct but it is best to add&lt;BR /&gt;DMA_TCD0_SLASTSGA = 0x00; too since these registers can be random at reset.&lt;BR /&gt;DMA_TCD0_DLASTSGA = -(sizeof(buffer)); is generally used if the output data is prepared in a circular buffer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should set the DREQ flag in the DMA_TCD0_CSR register when working with peripherals otherwise each time there is a trigger 'all' bytes will be sent (overflow). The DREQ flag tells the eDMA to transfer only one byte per DMA trigger and not perform a burst transfer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DMA_TCD0_NBYTES_MLNO= 0x04; is incorrect, it should be 1 since each transfer is a single byte and not 4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DMA_SERQ |= DMA_SERQ_SERQ_MASK; may work but is not correct. It should be DMA_SERQ = 1; since you want to start operation only on this one channel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DMA_TCD0_CSR = DMA_CSR_START_MASK; is also not correct since it is a software method of starting a transfer and not a peripheral driven one.&lt;BR /&gt;DMA_TCD0_CSR = DMA_CSR_DREQ; is correct, but it should be "before" the DMA_SERQ write. The first byte will automatically be started if the UART Tx Tx buffer is empty when DMA_SERQ = 1; is performed.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;BR /&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;BR /&gt;&lt;FONT color="#999999"&gt;Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 10:21:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1169597#M58541</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-10-19T10:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170001#M58546</link>
      <description>&lt;P&gt;Thank You for your response.&lt;/P&gt;&lt;P&gt;Now if i want to send 109 bytes in a single DMA request . Here I am facing lots for problem. Can you explain me this. How it is done.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 03:36:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170001#M58546</guid>
      <dc:creator>mdrasool_yadwad</dc:creator>
      <dc:date>2020-10-20T03:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170242#M58551</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;To perform a multiple transfer on a single trigger the minor loop counter (MLNO) is used.&lt;BR /&gt;This is however not of use for a peripheral driver like a UART.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 09:25:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170242#M58551</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-10-20T09:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170301#M58554</link>
      <description>&lt;P&gt;Then how to resolve this. Whether DMA is helpful in UART peripheral.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 10:52:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170301#M58554</guid>
      <dc:creator>mdrasool_yadwad</dc:creator>
      <dc:date>2020-10-20T10:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170537#M58560</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Multiple triggers when there is one place available in a peripheral is incorrect and will cause failure. A single transfer on each trigger is the correct way to do it.&lt;/P&gt;&lt;P&gt;DMA is very useful since there is no CPU overhead involved but doing it the wrong way (multiple transfers for a single trigger is incorrect and so won't work) won't allow it to be solved.&lt;/P&gt;&lt;P&gt;There are possibly working examples in the SDKs or there is a proven one at the GIT hub link I gave. It may be easier to use something that functions as reference to get you over the present difficulties or re-read the eDMA users manual carefully to gain more understanding.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 20:45:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1170537#M58560</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-10-20T20:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: DMA UART K60 Error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1171524#M58574</link>
      <description>&lt;P&gt;hello sir,&lt;/P&gt;&lt;P&gt;Now i am facing problems in receive. I want to receive 4 bytes and store in the buffer but the buffer is loaded with same value. below i have written my code please go through it .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//Receive Function&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;DMA_SADDR_REG(dmach , ch) =0;&lt;BR /&gt;&lt;BR /&gt;DMA_SADDR_REG(dmach , ch)|= DMA_SADDR_SADDR(0x4006B007); // CONFIGURING SOURCE ADDRESS&lt;BR /&gt;DMA_SOFF_REG(dmach,ch) =0;&lt;/P&gt;&lt;P&gt;DMA_ATTR_REG(dmach , ch) = (DMA_ATTR_SSIZE(0) | DMA_ATTR_DSIZE(0)); //CONFIGURING SOURCE ADDRESS SIZE&lt;/P&gt;&lt;P&gt;DMA_NBYTES_MLNO_REG(dmach , ch) = 0;&lt;BR /&gt;&lt;BR /&gt;DMA_NBYTES_MLNO_REG(dmach , ch)|= (DMA_NBYTES_MLNO_NBYTES(0x04));&lt;BR /&gt;DMA_DADDR_REG(dmach , ch) = 0;&lt;BR /&gt;DMA_DADDR_REG(dmach , ch) |= DMA_DADDR_DADDR(val); //CONFIGURING DESTINATION ADDRESS ADDRESS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DMA_DOFF_REG(dmach , ch) = DMA_DOFF_DOFF(0x01);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DMA_BITER_ELINKNO_REG(dmach , ch) =0;&lt;BR /&gt;DMA_BITER_ELINKNO_REG(dmach , ch) = DMA_BITER_ELINKNO_BITER(0x4); //STARTING MAJOR ITERATION COUNT&lt;BR /&gt;DMA_CITER_ELINKNO_REG(dmach , ch) =0;&lt;BR /&gt;DMA_CITER_ELINKNO_REG(dmach , ch) = DMA_CITER_ELINKNO_CITER(0x4); // CURRENT MAJOR ITERATION COUNT&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DMA_SERQ |= DMA_SERQ_SERQ_MASK;&lt;BR /&gt;&lt;BR /&gt;DMA_CSR_REG(dmach , ch) = DMA_CSR_START_MASK; // START THE DMA&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 04:02:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-UART-K60-Error/m-p/1171524#M58574</guid>
      <dc:creator>mdrasool_yadwad</dc:creator>
      <dc:date>2020-10-22T04:02:34Z</dc:date>
    </item>
  </channel>
</rss>

