<?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>Kinetis MicrocontrollersのトピックK65  UART FIFO error</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656744#M40147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We need to use UART1 at 3.6864Mbps with the FIFO and although it works there is a hardware failure. At random times the RDRF flag in S1 is set but when you read the RCFIFO it is zero causing an endless interrupt loop.&lt;/P&gt;&lt;P&gt;From the interrupt handler:&lt;/P&gt;&lt;P&gt;void UART_TransferHandleIRQ(UART_Type *base, uart_handle_t *handle)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;/* Receive data register full */&lt;BR /&gt; if ((UART_S1_RDRF_MASK &amp;amp; base-&amp;gt;S1) &amp;amp;&amp;amp; (UART_C2_RIE_MASK &amp;amp; base-&amp;gt;C2))&lt;BR /&gt; {&lt;BR /&gt;/* Get the size that can be stored into buffer for this interrupt. */&lt;BR /&gt;#if defined(FSL_FEATURE_UART_HAS_FIFO) &amp;amp;&amp;amp; FSL_FEATURE_UART_HAS_FIFO&lt;BR /&gt; count = base-&amp;gt;RCFIFO;&lt;BR /&gt;#else&lt;BR /&gt; count = 1;&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;if (count == 0) {&lt;BR /&gt;__ASM("NOP");&amp;nbsp;&amp;nbsp;&amp;nbsp;// Breakpoint&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/* If handle-&amp;gt;rxDataSize is not 0, first save data to handle-&amp;gt;rxData. */&lt;BR /&gt; while ((count) &amp;amp;&amp;amp; (handle-&amp;gt;rxDataSize))&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;The data register is not read as the count is zero. If I try to resolve the issue by reading the data register the RXUF flag in the SFIFO register gets set&amp;nbsp;indicating that there was no data in the FIFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is more pronounced if the baud rate division is below 3, 180MHZ / 16 / 3801600 = 2.959, as then it fails within a few bytes. If using a lower baud rate of say 921600 then there is no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FIFO water mark is set to 2 and I'm using 8,n,1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed some light on the problem please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Charles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2017 11:48:39 GMT</pubDate>
    <dc:creator>charlesklibbe</dc:creator>
    <dc:date>2017-02-21T11:48:39Z</dc:date>
    <item>
      <title>K65  UART FIFO error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656744#M40147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We need to use UART1 at 3.6864Mbps with the FIFO and although it works there is a hardware failure. At random times the RDRF flag in S1 is set but when you read the RCFIFO it is zero causing an endless interrupt loop.&lt;/P&gt;&lt;P&gt;From the interrupt handler:&lt;/P&gt;&lt;P&gt;void UART_TransferHandleIRQ(UART_Type *base, uart_handle_t *handle)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;/* Receive data register full */&lt;BR /&gt; if ((UART_S1_RDRF_MASK &amp;amp; base-&amp;gt;S1) &amp;amp;&amp;amp; (UART_C2_RIE_MASK &amp;amp; base-&amp;gt;C2))&lt;BR /&gt; {&lt;BR /&gt;/* Get the size that can be stored into buffer for this interrupt. */&lt;BR /&gt;#if defined(FSL_FEATURE_UART_HAS_FIFO) &amp;amp;&amp;amp; FSL_FEATURE_UART_HAS_FIFO&lt;BR /&gt; count = base-&amp;gt;RCFIFO;&lt;BR /&gt;#else&lt;BR /&gt; count = 1;&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;if (count == 0) {&lt;BR /&gt;__ASM("NOP");&amp;nbsp;&amp;nbsp;&amp;nbsp;// Breakpoint&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/* If handle-&amp;gt;rxDataSize is not 0, first save data to handle-&amp;gt;rxData. */&lt;BR /&gt; while ((count) &amp;amp;&amp;amp; (handle-&amp;gt;rxDataSize))&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;The data register is not read as the count is zero. If I try to resolve the issue by reading the data register the RXUF flag in the SFIFO register gets set&amp;nbsp;indicating that there was no data in the FIFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is more pronounced if the baud rate division is below 3, 180MHZ / 16 / 3801600 = 2.959, as then it fails within a few bytes. If using a lower baud rate of say 921600 then there is no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FIFO water mark is set to 2 and I'm using 8,n,1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed some light on the problem please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Charles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2017 11:48:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656744#M40147</guid>
      <dc:creator>charlesklibbe</dc:creator>
      <dc:date>2017-02-21T11:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: K65  UART FIFO error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656745#M40148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having the same problem, I work with the K22F processor and whem I read the RCFIFO&amp;nbsp;it is zero causing infinite lupping.&lt;/P&gt;&lt;P&gt;Anyone have any idea what the problem might be?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2017 16:57:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656745#M40148</guid>
      <dc:creator>viniciuskawakam</dc:creator>
      <dc:date>2017-12-07T16:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: K65  UART FIFO error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656746#M40149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same problem. Was there ever a fix for it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;TIm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 14:47:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656746#M40149</guid>
      <dc:creator>ETCTim</dc:creator>
      <dc:date>2018-09-12T14:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: K65  UART FIFO error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656747#M40150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it sure that no overruns are involved? In the case of an overrun there may be a reception interrupt left which needs the data register to be read (even when nothing in it) to clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interrupt handler looks also suspect - I think it is safer to unconditionally read the data register and then check whether there is still data&amp;nbsp; (and repeat if necessary) rater than base the operation on the Fifo status on entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using DMA should also avoid such issues.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 20:12:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-UART-FIFO-error/m-p/656747#M40150</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-09-12T20:12:00Z</dc:date>
    </item>
  </channel>
</rss>

