<?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 Kinetis K10 UART overrun error. in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-UART-overrun-error/m-p/232493#M5167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hello,&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm developing for the K10 MCU, CD IDE 10.4, compiler GCC 4.7.3.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The MCU has one block of the Flash program memory, 512Kb overall, no EEPROM.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Our device communicates with some host through UART serial interface, over half duplex RS485 differential line.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The device is defined slave, so it responses to the host's asynchronous cyclic requests with some application data.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The device responds to requests by UART RX ISR.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If the communication cable is disconnected, the host declares a timeout fault, but continues to send cyclic requests.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The host implements a clear fault command, which resets the communication in SW from the host side So, if the cable is connected back to the slave device, this clear faults command&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;is supposed to resolve the communication.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The slave device implements a handling of UART errors, which is supposed to resolve the errors and bring back proper UART RX interrupt handling.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm clearing the UART error in the UART error interrupt handler according to the reference manual:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Disable receiver.&lt;/LI&gt;&lt;LI&gt;Flush RX FIFO.&lt;/LI&gt;&lt;LI&gt;Read UART_S1.&lt;/LI&gt;&lt;LI&gt;Read UART_D.&lt;/LI&gt;&lt;LI&gt;Clear RX underflow flag in UART_SFIFO.&lt;/LI&gt;&lt;LI&gt;Enable receiver.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This doesn't resolve the communication. The slave device gets overrun error, which is cleaned by the above sequence, and stops with UART RX interrupts.&lt;/P&gt;&lt;P&gt;Am I doing something wrong with the error handling? How the overrun error is supposed to be cleaned?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Sep 2013 12:21:57 GMT</pubDate>
    <dc:creator>anatolyodler</dc:creator>
    <dc:date>2013-09-15T12:21:57Z</dc:date>
    <item>
      <title>Kinetis K10 UART overrun error.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-UART-overrun-error/m-p/232493#M5167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hello,&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm developing for the K10 MCU, CD IDE 10.4, compiler GCC 4.7.3.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The MCU has one block of the Flash program memory, 512Kb overall, no EEPROM.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Our device communicates with some host through UART serial interface, over half duplex RS485 differential line.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The device is defined slave, so it responses to the host's asynchronous cyclic requests with some application data.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The device responds to requests by UART RX ISR.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If the communication cable is disconnected, the host declares a timeout fault, but continues to send cyclic requests.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The host implements a clear fault command, which resets the communication in SW from the host side So, if the cable is connected back to the slave device, this clear faults command&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;is supposed to resolve the communication.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The slave device implements a handling of UART errors, which is supposed to resolve the errors and bring back proper UART RX interrupt handling.&lt;/P&gt;&lt;P style="font-size: 11.818181991577148px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm clearing the UART error in the UART error interrupt handler according to the reference manual:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Disable receiver.&lt;/LI&gt;&lt;LI&gt;Flush RX FIFO.&lt;/LI&gt;&lt;LI&gt;Read UART_S1.&lt;/LI&gt;&lt;LI&gt;Read UART_D.&lt;/LI&gt;&lt;LI&gt;Clear RX underflow flag in UART_SFIFO.&lt;/LI&gt;&lt;LI&gt;Enable receiver.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This doesn't resolve the communication. The slave device gets overrun error, which is cleaned by the above sequence, and stops with UART RX interrupts.&lt;/P&gt;&lt;P&gt;Am I doing something wrong with the error handling? How the overrun error is supposed to be cleaned?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Sep 2013 12:21:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-UART-overrun-error/m-p/232493#M5167</guid>
      <dc:creator>anatolyodler</dc:creator>
      <dc:date>2013-09-15T12:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K10 UART overrun error.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-UART-overrun-error/m-p/232494#M5168</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;To clear OR, read S1 when OR is set and then read UART data register (D). so you may do the following in the error ISR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; /* Read and save the S1 value */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = UART_S1_REG(channel);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Check to see if a receiver overrun has been detected */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (status &amp;amp; UART_S1_OR_MASK)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nUART receiver overrun detected.\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num_or_errors++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Read data register to clear the flag */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = UART_D_REG(channel);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the problem is still there, please check whether the host &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;ontinues to send cyclic requests&lt;/SPAN&gt; in that case. You may disable the RX function before clearing OR flag and never enable it, and see if OR interrupt happens anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 07:47:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K10-UART-overrun-error/m-p/232494#M5168</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-09-24T07:47:22Z</dc:date>
    </item>
  </channel>
</rss>

