<?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 Uart receive data in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Uart-receive-data/m-p/802354#M48795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;Hi NXP, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;There is problem about the function "status_t UART_TransferReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes)" in driver fsl_uart.c of K66 MCU. If my xfer defined as follow "uart_transfer_t RvBuffer={DataBuffer,50U};",and my ring buffer size is 100 by call function "UART_TransferStartRingBuffer(UART0, &amp;amp;RingBufferHandle, rxRingBuffer, 100);"does it mean that only when there are 50 bytes data received in ring buffer,the callback function of UART would be called?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt; Second question: When there are different length UART data frame like 30,40,8 and so on during communication,can I use function "UART_TransferReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes)" and set the datasize of xfer to 40 ? In the other words,what I should do to use function UART_TransferReceiveNonBlocking( ) correctly in fixed data frame length communication and varying data frame communication ? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;It's would be better to give example code and related detailed documents. Waiting online... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;Best regards, Frank&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2018 02:46:03 GMT</pubDate>
    <dc:creator>frank涛李</dc:creator>
    <dc:date>2018-08-20T02:46:03Z</dc:date>
    <item>
      <title>Uart receive data</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Uart-receive-data/m-p/802354#M48795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;Hi NXP, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;There is problem about the function "status_t UART_TransferReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes)" in driver fsl_uart.c of K66 MCU. If my xfer defined as follow "uart_transfer_t RvBuffer={DataBuffer,50U};",and my ring buffer size is 100 by call function "UART_TransferStartRingBuffer(UART0, &amp;amp;RingBufferHandle, rxRingBuffer, 100);"does it mean that only when there are 50 bytes data received in ring buffer,the callback function of UART would be called?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt; Second question: When there are different length UART data frame like 30,40,8 and so on during communication,can I use function "UART_TransferReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes)" and set the datasize of xfer to 40 ? In the other words,what I should do to use function UART_TransferReceiveNonBlocking( ) correctly in fixed data frame length communication and varying data frame communication ? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;It's would be better to give example code and related detailed documents. Waiting online... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;Best regards, Frank&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 02:46:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Uart-receive-data/m-p/802354#M48795</guid>
      <dc:creator>frank涛李</dc:creator>
      <dc:date>2018-08-20T02:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Uart receive data</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Uart-receive-data/m-p/802355#M48796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;This question was answered internally.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;Regarding your question,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&lt;BR clear="none" /&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;Does it mean that only when there are 50 bytes data received in ring buffer,the callback function of UART would be called?&lt;/SPAN&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;Yes, the size of the buffer you set in the Xfer would be the one that defines what trigger the callback, so if you define 50, then until you receive 50 data the callback will be triggered.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR clear="none" /&gt;&lt;EM style="font-size: small; font-family: arial;"&gt;When there are different length UART data frame like 30,40,8 and so on during communication,can I use function "UART_TransferReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes)" and set the datasize of xfer to 40 ? &lt;BR clear="none" /&gt;In the other words,what I should do to use function UART_TransferReceiveNonBlocking( ) correctly in fixed data frame length communication and varying data frame communication ?&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;Yes, you can use the API UART_TransferReceiveNonBlocking with different datasize in the xfer, so the callback will be triggered until you receive all the data you define, then you can define other datasize in xfer and call the API function again.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;There is an example for ringbuffer in the sdk, it is named as UART_interrupt_rb_transfer, you can located under driver examples.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;Best regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial; font-size: small;"&gt;Jorge Alcala&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 21:34:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Uart-receive-data/m-p/802355#M48796</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2018-10-15T21:34:59Z</dc:date>
    </item>
  </channel>
</rss>

