<?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: Using UART FIFO buffer in K22 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1313790#M61086</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I used FIFO buffer for UART1 with help of Rx Data buffer full Interrupt (kUART_RxDataRegFullInterruptEnable).&lt;/P&gt;&lt;P&gt;But now I only get the interrupt when number of data is equal to RXWaterMark. So in order to not miss any data, I also try to read the RX buffer of UART after a certain timeout. Everything works correctly if the baudrate of my RS485 utility matches with controller UART baudrate.&lt;/P&gt;&lt;P&gt;But in case I switch the baud rate of my utility to incorrect baudrate for some time and then again switch it back to correct baud rate, I get no response from the controller unless I soft restart the controller. As per my knowledge I have correctly handled all the error flags and cleared them as well.&lt;/P&gt;&lt;P&gt;Please help in resolving this issue.&lt;/P&gt;&lt;P&gt;I have attached the code files below.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vaibhavi P&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 09:27:55 GMT</pubDate>
    <dc:creator>vaibhavi_padwal</dc:creator>
    <dc:date>2021-07-27T09:27:55Z</dc:date>
    <item>
      <title>Using UART FIFO buffer in K22</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1302539#M60965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using custom board using MK22FX512AVLQ12. I want to use FIFO buffer in UART communication to reduce the number of interrupts I get.&lt;/P&gt;&lt;P&gt;I want to get an interrupt of (UART1) only after 8 packets of data are received. If there are less than 8 packets received I don't want to have an interrupt, instead I'll read that data after a specific time has elapsed (implementing timer using FTM).&lt;/P&gt;&lt;P&gt;I noticed that irrespective of the RX FIFO WaterMark, I always get the interrupt no. of packets received are equal to size of the receiver buffer whose pointer I pass as *xfer in following function:&lt;/P&gt;&lt;P&gt;status_t UART_TransferReceiveNonBlocking(UART_Type *base, uart_handle_t *handle,&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;uart_transfer_t *xfer&lt;/STRONG&gt;, size_t *receivedBytes)&lt;/P&gt;&lt;P&gt;Moreover, if I set the size of receiver buffer as 8 bytes and in case the data received is more than 8 packets I get an interrupt and read 8 packets of data. But I don't know how to read the remaining data packets once the my timer has elapsed. Please find the source code attached.&lt;/P&gt;&lt;P&gt;There are no example codes for the controller I am using in MCUXpresso. So I tried finding example codes of similar controller only using FIFO buffer triggering. But did not found an example code that will help me in understanding the issue.&lt;/P&gt;&lt;P&gt;Please help in resolving the issue. An example code that uses FIFO buffer based interrupts in K22 series would be of great help.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vaibhavi P&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 16:02:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1302539#M60965</guid>
      <dc:creator>vaibhavi_padwal</dc:creator>
      <dc:date>2021-07-05T16:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using UART FIFO buffer in K22</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1302543#M60966</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/84017"&gt;@vaibhavi_padwal&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;You might have a look at my code for the K02 (this is a stripped down K22, e.g. no USB) which uses the FIFO for RS-485 communication:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ErichStyger/MetaClockClock/blob/main/Firmware/ClockCommon/rs485Uart.c" target="_blank"&gt;https://github.com/ErichStyger/MetaClockClock/blob/main/Firmware/ClockCommon/rs485Uart.c&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It is using MCUXpresso IDE and SDK.&lt;/P&gt;&lt;P&gt;I hope this example helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 16:19:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1302543#M60966</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2021-07-05T16:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using UART FIFO buffer in K22</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1313790#M61086</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I used FIFO buffer for UART1 with help of Rx Data buffer full Interrupt (kUART_RxDataRegFullInterruptEnable).&lt;/P&gt;&lt;P&gt;But now I only get the interrupt when number of data is equal to RXWaterMark. So in order to not miss any data, I also try to read the RX buffer of UART after a certain timeout. Everything works correctly if the baudrate of my RS485 utility matches with controller UART baudrate.&lt;/P&gt;&lt;P&gt;But in case I switch the baud rate of my utility to incorrect baudrate for some time and then again switch it back to correct baud rate, I get no response from the controller unless I soft restart the controller. As per my knowledge I have correctly handled all the error flags and cleared them as well.&lt;/P&gt;&lt;P&gt;Please help in resolving this issue.&lt;/P&gt;&lt;P&gt;I have attached the code files below.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vaibhavi P&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 09:27:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1313790#M61086</guid>
      <dc:creator>vaibhavi_padwal</dc:creator>
      <dc:date>2021-07-27T09:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using UART FIFO buffer in K22</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1332323#M61382</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;There is an idle line detection feature in Kinetis MCU.&lt;/P&gt;
&lt;P&gt;When a frame of data is sent, the idle detection function will detect from the stop bit of the last data. When the10th or&amp;nbsp; the13th consecutive high levels are detected, it means that the data of the previous frame has been transmitted. At this time, UART generates an idle line interrupt, in which a data frame reception completion flag can be set, Then the main program can process the received data&lt;/P&gt;
&lt;P&gt;UARTx_S1 :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielchen_0-1630394522423.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/154625i444BE34FCE020497/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielchen_0-1630394522423.png" alt="danielchen_0-1630394522423.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 07:41:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-UART-FIFO-buffer-in-K22/m-p/1332323#M61382</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2021-08-31T07:41:34Z</dc:date>
    </item>
  </channel>
</rss>

