<?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: IMX233 debug UART - slow transmit speeds in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165655#M4392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi together,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have same issue when porting application using uart to imx6 and raspberry pi 2 model B. Interbyte time is time that each data byte sent via UART is delayed from the previous byte. With my application has interbyte time &amp;gt; 3ms, this time is too long and can't accept .more detail :&amp;nbsp; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;on Imx6, I already fixed this issue by update new lastest source driver imx.c for uart , this is link to new source : &lt;A href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/drivers/tty/serial/imx.c"&gt;https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/drivers/tty/serial/imx.c&lt;/A&gt;. after update I can run successful application but I don't know root cause and what we need to change. you can see discussion about imx6 for this issue at : &lt;A _jive_internal="true" href="https://community.nxp.com/thread/383199"&gt;https://community.freescale.com/thread/383199&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;And now, on Raspberry pi 2 model B, when porting this application I also met same issue with imx6. timeout error with interbyte allow is 1,9ms. I don't know what we need to change in source code for raspberry pi uart driver (ttyAMA0). Could you please tell me some solution to resolve this issue that affects the interbyte, or latency?&lt;/LI&gt;&lt;LI&gt;This is parameters in my application : byte 1 is 0xAA, byte 2 is 0x00 , 1 start bit, 1 stop bit, baud rate is 9600. Bellow is wave form with time between 2 byte data too long (&amp;gt;3ms)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG alt="enter image description here" class="jive-image" src="http://i.stack.imgur.com/fwzRv.png" /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This my parameter in my application : byte 1 is 0xAA, byte 2 is 0x00 , 1 start bit, 1 stop bit, baud rate is 9600. Bellow is wave form with time between 2 byte data too long.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="http://i.stack.imgur.com/iXR5p.png" rel="nofollow"&gt;&lt;IMG alt="enter image description here" class="jive-image" src="http://i.stack.imgur.com/iXR5p.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you suggest me a solution to reduce time delay in case 1, interbyte time is too long (&amp;gt;3ms )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking to respond from you ! &lt;/P&gt;&lt;P&gt;Many thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Mar 2016 10:38:06 GMT</pubDate>
    <dc:creator>linhdong</dc:creator>
    <dc:date>2016-03-25T10:38:06Z</dc:date>
    <item>
      <title>IMX233 debug UART - slow transmit speeds</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165650#M4387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On my IMX23 EVK board, I can run a test (basic serial port stuff) to talk from the IMX23 EVK to a "remote" system in my development environment. &amp;nbsp;It's a simple serial comm layer with a basic packet format. &amp;nbsp;Nothing special.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that each data byte sent via the IMX23 EVK debug UART is delayed from the previous byte by 20ms (as measured with a logic analyzer). &amp;nbsp;This, of course, is killing the transmit speed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0037727789 (19702 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0037747818 (20029 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0037767874 (20056 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0037787780 (19906 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0037807775 (19995 us): TXd 0x02&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0037827776 (20001 us): TXd 0x08&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0037847804 (20028 us): TXd 0x64&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this exact same test program to talk over an attached FTDI USB cable instead (using the serial port interface), I see much more reasonable inter-byte delays of about 3.5ms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0006399679 (3590 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0006403261 (3582 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0006407229 (3968 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0006410877 (3648 us): TXd 0x5A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0006414275 (3398 us): TXd 0x06&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0006417928 (3653 us): TXd 0x02&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;0006421259 (3331 us): TXd 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to design limitations in the "remote" system, the normal inter-byte delay should be about 2ms. &amp;nbsp;The code is specifically written to delay for this time. &amp;nbsp;So I can live with the 3.5ms, but 20ms is far too long and I can't figure out why the debug UART is so slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a similar problem when I originally tried to use the application UART, but that was resolved by disabling DMA mode on that driver. &amp;nbsp;I do not know why that seemed to improve things, but it absolutely did. &amp;nbsp;The debug UART driver, of course, is not using DMA mode. &amp;nbsp;It's not even an option. &amp;nbsp;It's using a basic Rx/Tx interrupt and as far as I can tell, it *should* be working fine. &amp;nbsp;But yet I'm seeing these 20ms delays between transmit bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing? &amp;nbsp;Is there an additional&amp;nbsp;coalescence&amp;nbsp;delay somewhere that I'm missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 11:59:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165650#M4387</guid>
      <dc:creator>twdorris</dc:creator>
      <dc:date>2012-06-05T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: IMX233 debug UART - slow transmit speeds</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165651#M4388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I went back to confirm that I could recreate the slowness on the application UART by enabling DMA mode and I could. &amp;nbsp;This time, however, I measured the inter-byte delay and got the same 20ms as was seen with the debug UART. &amp;nbsp;So now I'm a little confused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll go back and read the source and reference manual on the debug UART again. &amp;nbsp;Maybe it's using DMA as well and I just misread something. &amp;nbsp;If so, then maybe the whole problem is something DMA related that I just don't understand yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 12:59:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165651#M4388</guid>
      <dc:creator>twdorris</dc:creator>
      <dc:date>2012-06-05T12:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: IMX233 debug UART - slow transmit speeds</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165652#M4389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I've looked at the code side-by-side (debug UART vs. application UART). &amp;nbsp;I do not have any explanation for why the &lt;STRONG&gt;application&lt;/STRONG&gt; UART seems to have the same 20ms interbyte delay when using DMA &amp;nbsp;(CONFIG_MXS_AUART1_DMA_ENABLE) as the &lt;STRONG&gt;debug&lt;/STRONG&gt; UART does without DMA enabled (not even an option).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I disable DMA on the &lt;STRONG&gt;application&lt;/STRONG&gt; UART, I do not see this 20ms delay at all. &amp;nbsp;Everything flies through with minimal delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm missing something and I don't think it has anything to do with the IMX23 itself. &amp;nbsp;I think it probably has to do with something more general, like something related to Linux device driver call sequences. &amp;nbsp;Unfortunately, I don't know where to ask or read up on this to find out. &amp;nbsp;Hopefully *someone* on here will pick up on what I'm missing and point me in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 17:31:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165652#M4389</guid>
      <dc:creator>twdorris</dc:creator>
      <dc:date>2012-06-05T17:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: IMX233 debug UART - slow transmit speeds</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165653#M4390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh...one thing that just dawned on me that might apply here. &amp;nbsp;The Rx and Tx lines are tied together in this case. &amp;nbsp;So every byte that's written out to the port by the IMX23 driver is also immediately read back in as a received byte. &amp;nbsp;I wonder if that's kicking off something goofy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 19:54:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165653#M4390</guid>
      <dc:creator>twdorris</dc:creator>
      <dc:date>2012-06-05T19:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: IMX233 debug UART - slow transmit speeds</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165654#M4391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 20ms inter byte delay I was seeing on the debug UART was caused by the duart_tx_empty method in mxs-duart.c. &amp;nbsp;It's returning an inappropriate status as far as I can tell. &amp;nbsp;It's supposed to return an indication that the tx fifo is empty. &amp;nbsp;Instead it was returning an indication of something like !BUSY &amp;amp; !FULL. &amp;nbsp;This was causing the port-&amp;gt;timeout in serial_core to kick in which was set to basically pad with 20ms (see uart_update_timeout to read about the "0.02 seconds of slop" added to the timeout)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a patch in case any of the crickets in this forum want to look at it. &amp;nbsp;:) &amp;nbsp;Just note that I've done zero testing of this patch for anything other than my specific purpose. &amp;nbsp;There may well be perfectly valid reasons why the code was as it was originally. &amp;nbsp;I'm just not seeing it. &amp;nbsp;And, for what it's worth, the way this patch returns tx_empty is the same way the application UART returns tx_empty when DMA is disabled. &amp;nbsp;So we do at least have some indication that this is how Freescale had intended the function to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 12:48:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165654#M4391</guid>
      <dc:creator>twdorris</dc:creator>
      <dc:date>2012-06-06T12:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: IMX233 debug UART - slow transmit speeds</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165655#M4392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi together,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have same issue when porting application using uart to imx6 and raspberry pi 2 model B. Interbyte time is time that each data byte sent via UART is delayed from the previous byte. With my application has interbyte time &amp;gt; 3ms, this time is too long and can't accept .more detail :&amp;nbsp; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;on Imx6, I already fixed this issue by update new lastest source driver imx.c for uart , this is link to new source : &lt;A href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/drivers/tty/serial/imx.c"&gt;https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/drivers/tty/serial/imx.c&lt;/A&gt;. after update I can run successful application but I don't know root cause and what we need to change. you can see discussion about imx6 for this issue at : &lt;A _jive_internal="true" href="https://community.nxp.com/thread/383199"&gt;https://community.freescale.com/thread/383199&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;And now, on Raspberry pi 2 model B, when porting this application I also met same issue with imx6. timeout error with interbyte allow is 1,9ms. I don't know what we need to change in source code for raspberry pi uart driver (ttyAMA0). Could you please tell me some solution to resolve this issue that affects the interbyte, or latency?&lt;/LI&gt;&lt;LI&gt;This is parameters in my application : byte 1 is 0xAA, byte 2 is 0x00 , 1 start bit, 1 stop bit, baud rate is 9600. Bellow is wave form with time between 2 byte data too long (&amp;gt;3ms)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG alt="enter image description here" class="jive-image" src="http://i.stack.imgur.com/fwzRv.png" /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This my parameter in my application : byte 1 is 0xAA, byte 2 is 0x00 , 1 start bit, 1 stop bit, baud rate is 9600. Bellow is wave form with time between 2 byte data too long.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="http://i.stack.imgur.com/iXR5p.png" rel="nofollow"&gt;&lt;IMG alt="enter image description here" class="jive-image" src="http://i.stack.imgur.com/iXR5p.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you suggest me a solution to reduce time delay in case 1, interbyte time is too long (&amp;gt;3ms )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking to respond from you ! &lt;/P&gt;&lt;P&gt;Many thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 10:38:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX233-debug-UART-slow-transmit-speeds/m-p/165655#M4392</guid>
      <dc:creator>linhdong</dc:creator>
      <dc:date>2016-03-25T10:38:06Z</dc:date>
    </item>
  </channel>
</rss>

