<?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: lpc824 uart RXRDY interrupt in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-uart-RXRDY-interrupt/m-p/665307#M26614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seemed you take the bare-bones way, Have you tried the NXP-examples? Although not perfect, they help from time to time to get things done. May be you should try them so you can isolate the error source (if any).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jan 2017 00:33:12 GMT</pubDate>
    <dc:creator>fjrg76</dc:creator>
    <dc:date>2017-01-10T00:33:12Z</dc:date>
    <item>
      <title>lpc824 uart RXRDY interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-uart-RXRDY-interrupt/m-p/665306#M26613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I encountered a problem with RXRDY interrupt of uart in LPC824. I lost first bytes of packet sometimes.&lt;/P&gt;&lt;P&gt;One processor send packet of bytes (13 bytes) every 2 seconds. Another should receive that packet via interrupt. Receiver correctly accept in example 5 packets and the 6'th packets first two bytes was lost (interrupt not generated) and from third byte residual packet was received ok. Then again all ok wiht next packets, but after some time first bytes missing and so on.&lt;/P&gt;&lt;P&gt;Strange thing that if I use pooling method in main loop(if(( LPC_USART1-&amp;gt;STAT &amp;amp; 0x01)==1)), then all bytes received correctly, none bytes are lost. So I think interrupt not always generated?&lt;/P&gt;&lt;P&gt;LPC824 main clock is 60mhz, systemcoreclock 30mhz., uart &amp;nbsp;baudrate 115200 (but with others baudrates situaciot the same).&lt;/P&gt;&lt;P&gt;uart configuration:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;const uint32_t UARTCLKDIV=1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; /* Reset FRG */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;PRESETCTRL &amp;amp;= ~ (1&amp;lt;&amp;lt;2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;PRESETCTRL |= (1&amp;lt;&amp;lt;2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;UARTCLKDIV=UARTCLKDIV;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;UARTFRGDIV=0xFF;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; clk = SystemCoreClock*2/UARTCLKDIV;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;NVIC_DisableIRQ(UART1_IRQn);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; //enable uart&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (1&amp;lt;&amp;lt;15);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; //reset uart&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;PRESETCTRL&amp;amp;=~(1&amp;lt;&amp;lt;4);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;PRESETCTRL|=(1&amp;lt;&amp;lt;4);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; //enable pin switch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (1&amp;lt;&amp;lt;7);F&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SWM-&amp;gt;PINASSIGN1 = 0xFF1706FFUL; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_USART1-&amp;gt;CFG=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_USART1-&amp;gt;CFG |= (1 &amp;lt;&amp;lt; 2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;LPC_USART1-&amp;gt;BRG = clk / 16 / baudrate - 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_SYSCON-&amp;gt;UARTFRGMULT = (((clk / 16) * (LPC_SYSCON-&amp;gt;UARTFRGDIV + 1)) /&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; (baudrate * (LPC_USART1-&amp;gt;BRG + 1))) - (LPC_SYSCON-&amp;gt;UARTFRGDIV + 1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_USART1-&amp;gt;INTENSET = 1; // Enable UART interrupt rx&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; while ( LPC_USART1-&amp;gt;STAT &amp;amp; 0x01)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; regVal = LPC_USART1-&amp;gt;RXDAT; // Dump data from RX FIFO &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt; NVIC_SetPriority(UART1_IRQn,0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; NVIC_EnableIRQ(UART1_IRQn);&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; LPC_USART1-&amp;gt;CFG |= (1 &amp;lt;&amp;lt; 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2017 09:08:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-uart-RXRDY-interrupt/m-p/665306#M26613</guid>
      <dc:creator>alvarasmikalain</dc:creator>
      <dc:date>2017-01-08T09:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: lpc824 uart RXRDY interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-uart-RXRDY-interrupt/m-p/665307#M26614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seemed you take the bare-bones way, Have you tried the NXP-examples? Although not perfect, they help from time to time to get things done. May be you should try them so you can isolate the error source (if any).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 00:33:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-uart-RXRDY-interrupt/m-p/665307#M26614</guid>
      <dc:creator>fjrg76</dc:creator>
      <dc:date>2017-01-10T00:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: lpc824 uart RXRDY interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-uart-RXRDY-interrupt/m-p/665308#M26615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I will try NXP-examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 06:54:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-uart-RXRDY-interrupt/m-p/665308#M26615</guid>
      <dc:creator>alvarasmikalain</dc:creator>
      <dc:date>2017-01-12T06:54:21Z</dc:date>
    </item>
  </channel>
</rss>

