<?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 Why are the last few bytes in UART0's TX buffer delayed? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-are-the-last-few-bytes-in-UART0-s-TX-buffer-delayed/m-p/886870#M52473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm printing out some strings over UART0 (the LPUART, I believe) on a K22F.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes it works just fine; the entire string is printed out on the serial port.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other times, I see a strange behavior: most of the string is printed, except for the last few bytes. The next time a string is printed, the missing bytes appear, but the end of the next string is missing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I print "Hello World!" and see:&lt;BR /&gt;"Hello Wor"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then, I trigger the next string ("another string") to be printed in my code, and I see:&lt;/P&gt;&lt;P&gt;ld!&lt;/P&gt;&lt;P&gt;another str&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it's like the UART is "falling a few bytes behind" and not catching up, even though the bytes are still in the TX buffer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the PE asynchronous serial component as a driver. Any ideas about why this is happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2019 00:23:31 GMT</pubDate>
    <dc:creator>asfarley</dc:creator>
    <dc:date>2019-02-07T00:23:31Z</dc:date>
    <item>
      <title>Why are the last few bytes in UART0's TX buffer delayed?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-are-the-last-few-bytes-in-UART0-s-TX-buffer-delayed/m-p/886870#M52473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm printing out some strings over UART0 (the LPUART, I believe) on a K22F.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes it works just fine; the entire string is printed out on the serial port.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other times, I see a strange behavior: most of the string is printed, except for the last few bytes. The next time a string is printed, the missing bytes appear, but the end of the next string is missing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I print "Hello World!" and see:&lt;BR /&gt;"Hello Wor"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then, I trigger the next string ("another string") to be printed in my code, and I see:&lt;/P&gt;&lt;P&gt;ld!&lt;/P&gt;&lt;P&gt;another str&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it's like the UART is "falling a few bytes behind" and not catching up, even though the bytes are still in the TX buffer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the PE asynchronous serial component as a driver. Any ideas about why this is happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 00:23:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-are-the-last-few-bytes-in-UART0-s-TX-buffer-delayed/m-p/886870#M52473</guid>
      <dc:creator>asfarley</dc:creator>
      <dc:date>2019-02-07T00:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why are the last few bytes in UART0's TX buffer delayed?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-are-the-last-few-bytes-in-UART0-s-TX-buffer-delayed/m-p/886871#M52474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have a problem with the buffer driver and not the (LP)UART. It will stop supplying the UART interrupt with the next byte to send at some point when it shouldn't and then the last bytes from the buffer - plus the next string - are sent the next time it is started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the uTasker project (it is free on Git Hub and has a fool proof (LP)UART implementation in interrupt and DMA driven modes, including complete UART simulation). You can also use it as reference to solve the problem that you have.&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Complete Kinetis solutions, training and support:http://www.utasker.com/kinetis.html&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Kinetis K22:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-K22F.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-K22F.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/TWR-K22F120M.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TWR-K22F120M.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/BLAZE_K22.html" target="test_blank"&gt;http://www.utasker.com/kinetis/BLAZE_K22.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/tinyK22.html" target="test_blank"&gt;http://www.utasker.com/kinetis/tinyK22.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;UART:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VLPS with continuous UART operation: &lt;A href="https://community.nxp.com/message/421247#421247" target="test_blank"&gt;https://community.nxp.com/message/421247#421247&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;UART: &lt;A href="http://www.utasker.com/docs/uTasker/uTaskerUART.PDF" target="test_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerUART.PDF&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Modbus ASCII/RTU: &lt;A href="http://www.utasker.com/docs/MODBUS/uTasker_MODBUS.PDF" target="test_blank"&gt;http://www.utasker.com/docs/MODBUS/uTasker_MODBUS.PDF&lt;/A&gt; &lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 00:42:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-are-the-last-few-bytes-in-UART0-s-TX-buffer-delayed/m-p/886871#M52474</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-02-07T00:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why are the last few bytes in UART0's TX buffer delayed?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-are-the-last-few-bytes-in-UART0-s-TX-buffer-delayed/m-p/886872#M52475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:50:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-are-the-last-few-bytes-in-UART0-s-TX-buffer-delayed/m-p/886872#M52475</guid>
      <dc:creator>asfarley</dc:creator>
      <dc:date>2019-02-07T16:50:53Z</dc:date>
    </item>
  </channel>
</rss>

