<?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: LPC1768, UART full duplex ? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685072#M27601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello customer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If your problem is solved, please help to mark the correct answer to close this question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you have the new question, please create the new question post, we will help you to answer it in your new post.&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: 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>Wed, 12 Jul 2017 02:11:33 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2017-07-12T02:11:33Z</dc:date>
    <item>
      <title>LPC1768, UART full duplex ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685069#M27598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello LPC users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using an UART3 to exchange data with an external device. UART3 set to 8 bits, no parity, 1200bauds, RX data interrupt enable.Here are the settings for UART3:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;LPC_SC -&amp;gt;PCONP |= (1&amp;lt;&amp;lt;25);&lt;/SPAN&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//select clock PCLK=CCLK/4 (clear bits 14:15)&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_SC -&amp;gt;PCLKSEL1 &amp;amp;= ~(PCLK_UART3_MASK) ;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// PINSEL9 Pin so that P4.28 = TXD3 and P4.29=RXD3&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; 25:24 P4.28 GPIO Port 4.28 RX_MCLK MAT2.0 TXD3&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; 27:26 P4.29 GPIO Port 4.29 TX_MCLK MAT2.1 RXD3&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_PINCON-&amp;gt;PINSEL9 |=&amp;nbsp; ((3 &amp;lt;&amp;lt; 24) | (3 &amp;lt;&amp;lt; 26));&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;LCR = 0x83;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// 8 bits, no Parity, 1 Stop bit, DLAB=1&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Settings value assume a 25MHz base frequency - clock is 100Mhz and PCLKSEL1=0 (so PCLK=CCLK/4)&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// for 4800 bds:&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;FDR = 0xe3 ;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// MULVAL=0x0e; DIVADDVAL=0x03 &amp;nbsp;&amp;nbsp; &amp;nbsp;0xe3&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;DLL = 0x0c ;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// DLL 0x0c&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;DLM = 0x01 ;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// DLM 0x01&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_UART3 -&amp;gt;IER = 0x01;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Enable RX DATA interrupt&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;LCR &amp;amp;= (~(0x80)) ;&amp;nbsp;&amp;nbsp; &amp;nbsp;// erase DLAB&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;FCR = 0x07;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Enable FIFO and reset TX and RX FIFO, trigger IRQ at first character received&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;TER |= (1&amp;lt;&amp;lt;7); &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// UART_TER_TXEN&amp;nbsp;&amp;nbsp; &amp;nbsp;!&amp;lt; Transmit enable bit&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_UART3 -&amp;gt;IER = 0x01;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Enable RX DATA interrupt, requires DLAB=1 ?&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NVIC_EnableIRQ(UART3_IRQn);&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: times new roman,times,serif; font-size: 12px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NVIC_SetPriority(UART3_IRQn , 0); // set highest priority&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I experiment some collisions in the received data frame, and RX data are loss.&lt;BR /&gt;Looking into LPC user manual, I notice that both registers for RX and TX (respectively named U3RBR and U3THR) are pointing on the same address?&lt;BR /&gt;Is this possible, in such conditions to get UART working in full duplex ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clue ?&lt;/P&gt;&lt;P&gt;Thank's&lt;/P&gt;&lt;P&gt;René&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 12:31:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685069#M27598</guid>
      <dc:creator>rnb</dc:creator>
      <dc:date>2017-07-05T12:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768, UART full duplex ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685070#M27599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello customer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Although the RX and TX are pointing on the same address, but I think it actually is the separated register. You can check the diagram.&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/24757iA81DC0E8704282C0/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;Read return the contents of read only received data buffer, and write go to the write-only transmit data buffer.&lt;/P&gt;&lt;P&gt;You said some collisions in the received data frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I don't know how you test it, and what the code in your UART ISR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Take an example, you can just test receive, no transmit, do you also meet the collisions in the received data?&lt;/P&gt;&lt;P&gt;This is the lpcopen code, you can refer to it:&lt;/P&gt;&lt;P&gt;void Chip_UART_IRQRBHandler(LPC_USART_T *pUART, RINGBUFF_T *pRXRB, RINGBUFF_T *pTXRB)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Handle transmit interrupt if enabled */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (pUART-&amp;gt;IER &amp;amp; UART_IER_THREINT) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_UART_TXIntHandlerRB(pUART, pTXRB);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Disable transmit interrupt if the ring buffer is empty */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (RingBuffer_IsEmpty(pTXRB)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_UART_IntDisable(pUART, UART_IER_THREINT);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&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;/* Handle receive interrupt */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_UART_RXIntHandlerRB(pUART, pRXRB);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Handle Autobaud interrupts */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_UART_ABIntHandler(pUART);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;If you didn't enable the transmit interrupt, you can just handle the receive interrupt.&lt;/P&gt;&lt;P&gt;Please test the receive interrupt directly, whether you also have the receive problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still have problem, please let me know!&lt;/P&gt;&lt;P&gt;&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, 06 Jul 2017 06:28:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685070#M27599</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-07-06T06:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768, UART full duplex ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685071#M27600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solve the problem. Now transmitting and receiving using IRQ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 08:27:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685071#M27600</guid>
      <dc:creator>rnb</dc:creator>
      <dc:date>2017-07-11T08:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768, UART full duplex ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685072#M27601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello customer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If your problem is solved, please help to mark the correct answer to close this question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you have the new question, please create the new question post, we will help you to answer it in your new post.&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: 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>Wed, 12 Jul 2017 02:11:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-UART-full-duplex/m-p/685072#M27601</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-07-12T02:11:33Z</dc:date>
    </item>
  </channel>
</rss>

