<?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: Help with DMA and UART, circular receive buffer</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282353#M10535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Santiago and Mark,&lt;/P&gt;&lt;P&gt;Finally I managed to get the code to work as it is. The problem was that I've configured a breakpoint in the IRQ handler of DMA2, and this somehow generated the problem. It seems as if the DMA2 gets a second request before clearing the DONE bit while the CPU is suspended because of the breakpoint, and this generates the Configuration Error in DMA2. I don't have time to dig deeper into the matter, but it would be interesting.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Francisco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Feb 2016 13:14:19 GMT</pubDate>
    <dc:creator>fjsanchez</dc:creator>
    <dc:date>2016-02-29T13:14:19Z</dc:date>
    <item>
      <title>Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282342#M10524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the UART and have set up an UART receive interrupt that reads the received byte value and puts it in a circular buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try higher baud rates I sometimes get over run errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use the DMA in some way together with my circular buffer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is it only possible to receive a determined number of bytes with the DMA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have tested some code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I must link two DMA channels. But now I don't know how to do that. I need some examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 11:26:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282342#M10524</guid>
      <dc:creator>markosiponen</dc:creator>
      <dc:date>2013-08-29T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282343#M10525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be happy to help you with this. Which Kinetis device are you using for your application?&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;Martyn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 14:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282343#M10525</guid>
      <dc:creator>martynhunt</dc:creator>
      <dc:date>2013-09-03T14:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282344#M10526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The uTasker Kinetis project includes UART DMA reception support on one or more UARTs (up to 6 at one time).&lt;/P&gt;&lt;P&gt;- Each UART can be configured to inform the application when a full circular buffer content is ready (not often useful since the reception is blocked until the buffer is read)&lt;/P&gt;&lt;P&gt;- Alternatively the circular buffer can operate in half-buffer mode, meaning that there will be a notification when the buffer is half-full so that the application has a half-buffer time to clear the buffer for re-use (ping-pong operation)&lt;/P&gt;&lt;P&gt;- Finally a free-running DMA mode is configable where the DMA continuously fills the circular buffer. The application should regularly check the state of the buffer and clear content before the DMA overwrites the buffer again. There are no interrupts ever needed for this mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The free-running DMA Rx has proven very useful for high speed UART operation with it being used successfully in a design with 6 UARTs operating in parallel at over 3 MBaud.&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;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.uTasker.com"&gt;http://www.uTasker.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 16:04:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282344#M10526</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2013-09-09T16:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282345#M10527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a KL15.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 06:21:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282345#M10527</guid>
      <dc:creator>markosiponen</dc:creator>
      <dc:date>2013-10-11T06:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282346#M10528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't find any information about free running DMA in the KL15 Sub-Family Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an example of this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 06:23:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282346#M10528</guid>
      <dc:creator>markosiponen</dc:creator>
      <dc:date>2013-10-11T06:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282347#M10529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any help on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 06:30:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282347#M10529</guid>
      <dc:creator>markosiponen</dc:creator>
      <dc:date>2013-10-16T06:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282348#M10530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any help on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 06:30:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282348#M10530</guid>
      <dc:creator>markosiponen</dc:creator>
      <dc:date>2013-10-16T06:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282349#M10531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I apologize for the delay. I have attached some code that shows how to create a continuous circular buffer using DMA. If you have any questions, please let me know. This code was developed in IAR from Freescale Sample Code for KL25.&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;Martyn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: Modified source files for a two DMA channel solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 14:53:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282349#M10531</guid>
      <dc:creator>martynhunt</dc:creator>
      <dc:date>2013-10-16T14:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282350#M10532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I've implemented in a KL05 the solution to this problem provided by Martyn, but I get a configuration error (CE) when the linked DMA channel 2 tries to clear the DONE bit in the register BCR of the DMA channel 0. Has someone else had this problem?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Francisco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Feb 2016 18:36:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282350#M10532</guid>
      <dc:creator>fjsanchez</dc:creator>
      <dc:date>2016-02-27T18:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282351#M10533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see any reason why the linked DMA&amp;nbsp; channel 2 operation should fail: Are you sure that the failure is not due to channel 0 because in the case of circular buffer operation the circular buffer must have a vaid length and also be aligned on an address that is divisible by the buffer length. &lt;EM&gt;If the buffer alignment is incorrect it will fail.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The probem with linking DMA to do this is that the DMA channels are ineffciently consumed (there are only 4, so each is valuable) - in many case it is more efficient to not link like this but instead just have a timer interrupt or a task regularly writing DMA channel 0's transfer count to its maximum value again &lt;EM&gt;so that it never completes&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;It is a shame that the KL DMA doesn't have a free-run mode (like the DMA in the K parts) - eg. to just stop counting down the transfer count value - the designers made quite a boner in this instance because they made doing something that should be as easy as pie into a silly excercise to overcome its annoying behaviour.&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;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Feb 2016 13:44:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282351#M10533</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2016-02-28T13:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282352#M10534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/fjsanchez"&gt;fjsanchez&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you share your project or the isolated issue so I can replicate and analyze it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Santiago&lt;/P&gt;&lt;H1 class="fn n font-color-white" style="padding-bottom: 15px; border: 0px; font-weight: 400; font-size: 21px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; vertical-align: baseline; color: #ffffff; fill: #ffffff; background-color: #404040;"&gt;Francisco Javier Sanchez Fernandez&lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 08:41:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282352#M10534</guid>
      <dc:creator>santiago_gonzal</dc:creator>
      <dc:date>2016-02-29T08:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DMA and UART, circular receive buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282353#M10535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Santiago and Mark,&lt;/P&gt;&lt;P&gt;Finally I managed to get the code to work as it is. The problem was that I've configured a breakpoint in the IRQ handler of DMA2, and this somehow generated the problem. It seems as if the DMA2 gets a second request before clearing the DONE bit while the CPU is suspended because of the breakpoint, and this generates the Configuration Error in DMA2. I don't have time to dig deeper into the matter, but it would be interesting.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Francisco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 13:14:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-with-DMA-and-UART-circular-receive-buffer/m-p/282353#M10535</guid>
      <dc:creator>fjsanchez</dc:creator>
      <dc:date>2016-02-29T13:14:19Z</dc:date>
    </item>
  </channel>
</rss>

