<?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>LPC MicrocontrollersのトピックRe: LPC5410x UART overrun issue</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-UART-overrun-issue/m-p/868628#M34611</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sven Savic,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I suggest you refer to the official SDK code for LPC5410X at first, there has the UART block code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please download the code from this link:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/builder" title="https://mcuxpresso.nxp.com/en/builder"&gt;https://mcuxpresso.nxp.com/en/builder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Choose the board as LPCXpress54102, then generate the code and download it.&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can find the uart code from this folder:&lt;/P&gt;&lt;P&gt;SDK_2.4.1_LPCXpresso54102\boards\lpcxpresso54102\driver_examples\usart\polling&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2019 11:26:55 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2019-02-20T11:26:55Z</dc:date>
    <item>
      <title>LPC5410x UART overrun issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-UART-overrun-issue/m-p/868627#M34610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have always used interrupt based UART for any data transfer, so this is bit unknown to me. Seemingly most of my data goes down to the drain when I try to read uart "synchronously" (I dont mean synchronous mode of UART, but just not interrupt based).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have loop something like this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;while (1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (uart.dataReady()) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;buff = uart.receive();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&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;delay_us(100);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint8_t uart::dataReady()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return IS_BIT_SET (channel.STAT, RXRDY);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;uint8_t uart::receive()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; return channel.RXDAT;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I put delay between each transmit sequence in the host system, this kinda works. but not reliably.&lt;/P&gt;&lt;P&gt;Without delay, I receive first character and then I get overrunint=1 in STAT and rest of the data is lost.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Logic analyzer shows all data, and baud is set correctly (115200). Uart is connected to wifi module and host is connected over the wifi.&lt;/P&gt;&lt;P&gt;My packages are 10-30 bytes. I only receive first byte of each packet ??&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With interrupt, everything works like a charm. .. so its obviously issue with collecting the data from UART.&lt;/P&gt;&lt;P&gt;Unfortunately, in this case I cant use interrupt as I need to write some data to FLASH RAM and if interrupt is enabled, uC got stuck after IAP_RAM2FLASH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont need to do any operation when data transfer starts, so blocking calls are fine. How do I reliably read the whole data buffer synchronously ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2019 16:51:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-UART-overrun-issue/m-p/868627#M34610</guid>
      <dc:creator>svensavic</dc:creator>
      <dc:date>2019-02-16T16:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5410x UART overrun issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-UART-overrun-issue/m-p/868628#M34611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sven Savic,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I suggest you refer to the official SDK code for LPC5410X at first, there has the UART block code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please download the code from this link:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/builder" title="https://mcuxpresso.nxp.com/en/builder"&gt;https://mcuxpresso.nxp.com/en/builder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Choose the board as LPCXpress54102, then generate the code and download it.&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can find the uart code from this folder:&lt;/P&gt;&lt;P&gt;SDK_2.4.1_LPCXpresso54102\boards\lpcxpresso54102\driver_examples\usart\polling&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 11:26:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-UART-overrun-issue/m-p/868628#M34611</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2019-02-20T11:26:55Z</dc:date>
    </item>
  </channel>
</rss>

