<?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 How to read UART Rx FIFO when triggered interrupt for 8 byte is generated ? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-UART-Rx-FIFO-when-triggered-interrupt-for-8-byte-is/m-p/729120#M29469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on UART in which i want Interrupt to be invoke after 8 bytes of data is received in FIFO. How to read this FIFO after interrupt is generated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jan 2018 16:16:19 GMT</pubDate>
    <dc:creator>balwant</dc:creator>
    <dc:date>2018-01-16T16:16:19Z</dc:date>
    <item>
      <title>How to read UART Rx FIFO when triggered interrupt for 8 byte is generated ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-UART-Rx-FIFO-when-triggered-interrupt-for-8-byte-is/m-p/729120#M29469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on UART in which i want Interrupt to be invoke after 8 bytes of data is received in FIFO. How to read this FIFO after interrupt is generated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 16:16:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-UART-Rx-FIFO-when-triggered-interrupt-for-8-byte-is/m-p/729120#M29469</guid>
      <dc:creator>balwant</dc:creator>
      <dc:date>2018-01-16T16:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to read UART Rx FIFO when triggered interrupt for 8 byte is generated ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-UART-Rx-FIFO-when-triggered-interrupt-for-8-byte-is/m-p/729121#M29470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi BALWANT BISHNOI.&lt;/P&gt;&lt;P&gt;1. Interrupt is invoked after 8 bytes of data is received in FIFO.&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can configure this register:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/17251iC6C150D9B6D76F50/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. How to read this FIFO after interrupt is generated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can read it like this:&lt;/P&gt;&lt;P&gt;/* Read data through the UART peripheral (non-blocking) */&lt;BR /&gt;int Chip_UART_Read(LPC_USART_T *pUART, void *data, int numBytes)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int readBytes = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint8_t *p8 = (uint8_t *) data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Send until the transmit FIFO is full or out of bytes */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while ((readBytes &amp;lt; numBytes) &amp;amp;&amp;amp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ((Chip_UART_ReadLineStatus(pUART) &amp;amp; UART_LSR_RDR) != 0)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*p8 = Chip_UART_ReadByte(pUART);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;p8++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;readBytes++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return readBytes;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 04:33:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-UART-Rx-FIFO-when-triggered-interrupt-for-8-byte-is/m-p/729121#M29470</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-01-18T04:33:36Z</dc:date>
    </item>
  </channel>
</rss>

