<?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: UART APIs for non-consistent message sizes in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/UART-APIs-for-non-consistent-message-sizes/m-p/1517843#M194809</link>
    <description>&lt;P&gt;I ended up using&amp;nbsp;&lt;SPAN&gt;LPUART_ReadByte /&amp;nbsp;LPUART_WriteByte and a separate ring buffer for each direction. &amp;nbsp;This works. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next is to added USB connection. &amp;nbsp;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 15:33:02 GMT</pubDate>
    <dc:creator>mrecoskie</dc:creator>
    <dc:date>2022-09-06T15:33:02Z</dc:date>
    <item>
      <title>UART APIs for non-consistent message sizes</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/UART-APIs-for-non-consistent-message-sizes/m-p/1516428#M194683</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I’m working with the RT1052/RT1064 and MCUXpresso v11.5. &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;My goal is to create a USB (device side) to UART bridge.&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;I could not find any close examples to this beyond the Host CDC.&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;So I started to create this from scratch.&lt;/P&gt;&lt;P&gt;I need to use UART byte by byte receiving because of dynamic incoming message sizes.&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Can you confirm it is not possible to use the RX interrupt (and ReceiveByte) and the TransferSendNonBlocking together?&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Each mechanism works separately for me but not together.&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Looking inside the code it seems as through the LPUART_TransferCreateHandle function deals with the RX interrupt which probably prevents my custom RX IRQ handler with LPUART_ReadByte from working.&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;If that is the case, is it better to implement both send and receive via interrupt handling or is there another suggestion?&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Thanks.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;For TX: &lt;/U&gt;&lt;/P&gt;&lt;P&gt;LPUART_Init&lt;/P&gt;&lt;P&gt;LPUART_CreateHandle&lt;/P&gt;&lt;P&gt;LPUART_TransferSendNonBlocking&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;For RX:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;LPUART_EnableInterrupts&lt;/P&gt;&lt;P&gt;EnableIRQ&lt;/P&gt;&lt;P&gt;In ISR - LPUART_ReadByte&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 17:51:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/UART-APIs-for-non-consistent-message-sizes/m-p/1516428#M194683</guid>
      <dc:creator>mrecoskie</dc:creator>
      <dc:date>2022-09-02T17:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: UART APIs for non-consistent message sizes</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/UART-APIs-for-non-consistent-message-sizes/m-p/1517843#M194809</link>
      <description>&lt;P&gt;I ended up using&amp;nbsp;&lt;SPAN&gt;LPUART_ReadByte /&amp;nbsp;LPUART_WriteByte and a separate ring buffer for each direction. &amp;nbsp;This works. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next is to added USB connection. &amp;nbsp;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 15:33:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/UART-APIs-for-non-consistent-message-sizes/m-p/1517843#M194809</guid>
      <dc:creator>mrecoskie</dc:creator>
      <dc:date>2022-09-06T15:33:02Z</dc:date>
    </item>
  </channel>
</rss>

